Giter VIP home page Giter VIP logo

Comments (9)

JohnnyP10 avatar JohnnyP10 commented on May 27, 2024

it doesn't need to be Shobboleth-eppn but it should be whatever your SP configuration is setup to return as the eppn. In my environment i don't need the Shiibboleth prefix at all since the SP is configured to return the unique username as the eppn variable.

from django-shibboleth-remoteuser.

trevoriancox avatar trevoriancox commented on May 27, 2024

I think your answer helps illustrate my point. :) I'm suggesting that since the SP configurations vary, best not to hard-code assumptions like "Shibboleth-eppn" or "eppn". REMOTE_USER will be set to the username as well won't it? So why not just use that?

from django-shibboleth-remoteuser.

FlipperPA avatar FlipperPA commented on May 27, 2024

Does mod_shib / Apache set REMOTE_USER in this case? I'm guessing it does, but I'm not sure if that would also be the case with an nginx server setup, for example. I'm brand new to Shibboleth, so it is quite possible I'm wrong, just thinking out loud.

from django-shibboleth-remoteuser.

trevoriancox avatar trevoriancox commented on May 27, 2024

Yes, in Apache I am getting REMOTE_USER. That's an old CGI standard, not specific to Apache. But good point, nginx might require a "proxy_set_header REMOTE_USER $remote_user;". Elsewhere, REMOTE_USER is assumed in Django documentation: https://docs.djangoproject.com/en/1.9/howto/auth-remote-user/

from django-shibboleth-remoteuser.

JohnnyP10 avatar JohnnyP10 commented on May 27, 2024

It comes down to a bit of what FlipperPa writes. Shib does set Remote_User but i am not sure you can say it will always set it or that it is the only possible thing that will set it. Remote_User is part of HTTP, where as eppn is part of the SAML (Security Assertion Markup Language)

from django-shibboleth-remoteuser.

trevoriancox avatar trevoriancox commented on May 27, 2024

In shibboleth2.xml, I have:

<ApplicationDefaults ... REMOTE_USER="upn"

So that's where I got the idea that the default_shib_attributes configuration is redundant; I've already specified what SAML attribute maps to REMOTE_USER, and I shouldn't have to repeat that configuration again for django-shibboleth-remoteuser.

from django-shibboleth-remoteuser.

JohnnyP10 avatar JohnnyP10 commented on May 27, 2024

If all you care about is username from shibboleth then it is probably ok to do that. I'm not going to argue with you on that point, but normally you get back more than just username so it would be a matter of being consistent.

from django-shibboleth-remoteuser.

bcail avatar bcail commented on May 27, 2024

I like the idea of switching the default to be "REMOTE_USER" for the username. In the middleware, when we grab the username from the request META, we use self.header, which defaults to REMOTE_USER in django:
username = request.META[self.header]

Of course, we're just talking about the default here - the Shib attributes can be set differently, and the default self.header can be changed also.

Any objections to making this change?

from django-shibboleth-remoteuser.

trevoriancox avatar trevoriancox commented on May 27, 2024

I was just going to give up, thanks @bcail. Think of this situation: Someone like me has never used Shibboleth/SAML/etc before, has to try to get something up and running for a client. With this change, the default_shib_attributes will "just work" right away, albeit just for one field. Then they can set up their own attributes and add the other fields they need.

from django-shibboleth-remoteuser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.