[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: OpenShift Authentication alternative options?



At getupcloud we use a pretty standard django backend for authentication.

Here is a snippet of our /var/www/openshift/broker/httpd/conf.d/openshift-origin-auth-remote-user.conf


WSGIPythonPath /var/www/html/getup/admin:/var/www/html/getup/.env/lib/python2.6/site-packages
WSGIScriptAlias /getup /var/www/html/getup/admin/admin/wsgi.py
...
<Location /broker>
    AuthName "OpenShift Broker API"
    AuthType Basic
    AuthBasicProvider wsgi
    WSGIAuthUserScript /var/www/html/getup/admin/admin/wsgi.py

    Require valid-user

    SetEnvIfNoCase Authorization Bearer passthrough

    # The node->broker auth is handled in the Ruby code
    BrowserMatchNoCase "^OpenShift" passthrough
    BrowserMatchNoCase "^Java OpenShift" passthrough

    Allow from env=passthrough

    # Console traffic will hit the local port.  mod_proxy will set this header automatically.
    SetEnvIf X-Forwarded-For "^$" local_traffic=1
    # Turn the Console output header into the Apache environment variable for the broker remote-user plugin
    SetEnvIf X-Remote-User "(..*)" REMOTE_USER=$1
    Allow from env=local_traffic

    Order Deny,Allow
    Deny from all
    Satisfy any
</Location>


Mateus Caruccio
Master of Puppets
+55 (51) 8298.0026
gtalk: mateus caruccio getupcloud com
twitter: @MateusCaruccio

This message and any attachment are solely for the intended
recipient and may contain confidential or privileged information
and it can not be forwarded or shared without permission.
Thank you!


On Sat, Jul 12, 2014 at 8:54 AM, Andrew Lau <andrew andrewklau com> wrote:
Hi all,

I've been experimenting options to integrate openshift authentication
with other alternatives, plus add another option that pesky no logout
button that seems to be asked a lot.

I've so far found two methods, which 'should' work in theory. I
haven't tested it on an openshift install yet.. So let me throw some
ideas in the pit

- Using mod_authnz_external, it's possible to query a php/perl/python
file for a simple exit (0) or exit (1). The script could query a
remote API or database, easy enough and works well. I've used this for
MySQL queries before, redmine, etc. It works, but sometimes has some
weird selinux issues depending on the backend. For most cases with
querying a PHP file, it works great!

- Using httpd24, mod_auth_form is an option. Pretty much, it allows
you to create a full style'd HTML form which can do a POST for
user/password. The way I could see this working, is creating a
dedicated 'authserver' which would accept these auths and then reverse
proxy that over the openshift broker. Short of, modifying all of the
config to work with httpd24.

Both seem to support a 'logout derivative' ie,
http://httpd.apache.org/docs/current/mod/mod_auth_form.html#authformlogoutlocation

If I understand correctly, as openshift origin relies on httpd to do
auth. We don't have to create users? Previously when using kerberos, I
never had to register user accounts. I assume that would be the same
for these methods.

Alternatively, any hints on how the production deployments like
getupcloud and rh's openshift doing it?

Thanks,
Andrew

_______________________________________________
dev mailing list
dev lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]