# SSL proxy client certificate rewrite to username/password

**URL:** <https://www.ruby-forum.com/t/ssl-proxy-client-certificate-rewrite-to-username-password/229379>\
**Category:** NGINX\
**Created:** [February 4, 2013, 9:37am UTC](https://www.ruby-forum.com/t/ssl-proxy-client-certificate-rewrite-to-username-password/229379 "2013-02-04T09:37:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![twine](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ea5d25/32.png) [@twine](https://www.ruby-forum.com/u/twine)\
**Post date:** [February 4, 2013, 9:37am UTC](https://www.ruby-forum.com/t/ssl-proxy-client-certificate-rewrite-to-username-password/229379/1 "2013-02-04T09:37:31Z")

</div>

I want to use VoltDB’s HTTP JSON interface  
[http://voltdb.com/docs/UsingVoltDB/ProgLangJson.php](http://voltdb.com/docs/UsingVoltDB/ProgLangJson.php)  
section 15.2.1

I also want to use certificate based authentication of the client. I am  
thinking that I can use nginx as SSL frontend and have it rewrite the  
URL to  
include a randomly generated username and password as required by  
VoltDB.  
But, I can’t figure out how to write the rewrite rule in nginx’s conf  
file.  
I need to write multiple rules like this:  
if client certificate common name is X, add to URL the arguments,  
user=PRF(x, u)&password=PRF(x, p) where PRF is a pseudo random function

Is this possible? How? I appreciate your help!

Posted at Nginx Forum:

> **[SSL proxy client certificate rewrite to username/password](https://forum.nginx.org/read.php?2,235879,235879#msg-235879)**
>
> I want to use VoltDB's HTTP JSON interface http://voltdb.com/docs/UsingVoltDB/ProgLangJson.php section 15.2.1 I also want to use certificate based authentication of the client. I am thinking that I can use nginx as SSL frontend and have it rewrite...
