IdentityPython / SATOSA

Proxy translating between different authentication protocols (SAML2, OpenID Connect and OAuth2)
https://idpy.org
Apache License 2.0
199 stars 122 forks source link

Filter attributes by shibmd_scope #432

Closed vladimir-mencl-eresearch closed 1 year ago

vladimir-mencl-eresearch commented 1 year ago

All Submissions:

Fix #297 by extending satosa.micro_services.attribute_modifications.FilterAttributeValues to support not only regexp filtering but also add filter types shibmdscope_match_scope and shibmdscope_match_value - equivalent to https://shibboleth.atlassian.net/wiki/spaces/IDP4/pages/1272053894/ScopeMatchesShibMDScope and https://shibboleth.atlassian.net/wiki/spaces/IDP4/pages/1272053892/ValueMatchesShibMDScope from the Shibboleth project.

@c00kiemon5ter , please let me know whether you are happy with the overall approach - in #297, you indicated this should be done in a microservice - and in the end, it wasn't that hard.

I first thought I'd do this in a new microservice, but I'd just be replicating what FilterAttributeValues does - and this additional filtering fits in there conceptually well.

If happy with this approach, I'd add documentation and tests - but please let me know if overall happy with the approach I took.

Cheers, Vlad

c00kiemon5ter commented 1 year ago

@vladimir-mencl-eresearch I think it's fine! Please, go ahead 👍

vladimir-mencl-eresearch commented 1 year ago

Hi @c00kiemon5ter , I've now added tests - and also made a few tweaks, incl. removing the unnecessary re.compile - and switched to re.fullmatch as discussed.

I think it's now ready for a proper review - please let me know what you think needs to get done to get it merged.

Thanks a lot in advance for getting back to me.

Cheers, Vlad