Forum: NGINX Does nginx support openstack swift API?

F6a0c08917075a1ebc88d60ffa4461c4?d=identicon&s=25 Andy (Guest)
on 2014-05-29 13:05
(Received via mailing list)
Hello guys,

I'm trying to find a way to use OpenStack SWIFT with nginx, the below
are
request steps:

1. nginx is configured as proxy cache
2. client send a request to nginx for url:
http://domain.com/filename.txt
3. nginx received the request and it is a cache miss, it need to fetch
the
content from SWIFT proxy server
4. nginx send a request to swift proxy server for authentication, the
url
looks like http://swift-proxy/auth-account, account information is set
in
header, the response from swift proxy server contains a auth-token for
that
account if authentication success.
5. then nginx use this auth-token and put it in a new request header,
and
send the new request to the swift proxy server for the original request
content, there could be a map between client request url to the swift
proxy
url, for example, /filename.txt --> /account/container/filename.txt, so
the
new requst url could be
http://swift-proxy/account/container/filename.txt,
plus the auth-token.
6. swift proxy sever response the content to nginx, then nginx cache the
content and pass the response to the client.

Could the above requirement be accomplished by some specific
configuration
plus some existing nginx modules?


Thanks,
Andy
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2014-05-29 14:25
(Received via mailing list)
Hello!

On Thu, May 29, 2014 at 07:04:46PM +0800, Andy wrote:

> looks like http://swift-proxy/auth-account, account information is set in
>
> Could the above requirement be accomplished by some specific configuration
> plus some existing nginx modules?

Looks like something more or less possible with auth_request, see
http://nginx.org/en/docs/http/ngx_http_auth_reques....

--
Maxim Dounin
http://nginx.org/
F6a0c08917075a1ebc88d60ffa4461c4?d=identicon&s=25 Andy (Guest)
on 2014-05-30 09:21
(Received via mailing list)
On Thu, May 29, 2014 at 8:25 PM, Maxim Dounin <mdounin@mdounin.ru>
wrote:

> > 2. client send a request to nginx for url:
> > 5. then nginx use this auth-token and put it in a new request header, and
> >
> > Could the above requirement be accomplished by some specific
> configuration
> > plus some existing nginx modules?
>
> Looks like something more or less possible with auth_request, see
> http://nginx.org/en/docs/http/ngx_http_auth_reques....
>

Thanks, it works after some configuration changes.
2974d09ac2541e892966b762aad84943?d=identicon&s=25 jianjun.fang2807@gmail.com (Guest)
on 2014-08-12 21:03
(Received via mailing list)
Hi, hexiay,

I am not sure whether this email thread is still active. However, I am
encountering the similar issue you described. Based on your answer, you
have
found a solution, Do you mind sharing it? Or any one has the suggestion
on
how to configure Nginx HTTP Auth Request module to accomplish it?

Thanks,

JJ

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,250458,252514#msg-252514
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.