Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[additional feature] Add attribute policy filters and modifiers #17

Open
peppelinux opened this issue Jan 25, 2020 · 0 comments
Open

[additional feature] Add attribute policy filters and modifiers #17

peppelinux opened this issue Jan 25, 2020 · 0 comments

Comments

@peppelinux
Copy link
Member

peppelinux commented Jan 25, 2020

the IdP should have a default attr policy and customized policy for each SP.
example in settings.py, where '' meand default, an entityID should apply only on the corresponding SP.

SAML_ATTRIBUTE_POLICIES = {
                   '':  [{'package': 'uniauth.policies',
                         'policy_name': 'regexp_match',
                         'attribute_name': 'schacHomeOrganization',
                         'kwargs': {'regexp':'\.*unical.it',}},
                        ]
}

At the same way some attribute rewriter

SAML_ATTRIBUTE_REWRITERS = {
                   'that.ugly.sp':  [{'package': 'uniauth.rewriters',
                         'rewriter_name': 'replace',
                         'attribute_name': 'schacHomeOrganization',
                         'kwargs': {'from_str': 'unical', 'to_str': 'lacinu',}},

                          {'package': 'uniauth.rewriters',
                           'rewriter_name': 'regexp_replace',
                           'attribute_name': 'schacHomeOrganization',
                           'kwargs': {'regexp': 'unical', 'sub': 'gnocc',}},

                          {'package': 'uniauth.rewriters',
                           'rewriter_name': 'add_static_attribute',
                           'attribute_name': 'schacHomeOrganization',
                          'kwargs': {'value': 'ingoalla',}}
                        ]
}

rewriters result example:

schacHomeOrganization: unical.it
schacHomeOrganizationType: university
schacHomeOrganizationType: educationInstitution

if accounts doesn't have some common attribute values.

policies result example:
Filter out an Affiliation without a value "member"

@peppelinux peppelinux changed the title [additional feature] Add default attribute value if empty [additional feature] Add attribute policy filters and modfiers Mar 4, 2020
@peppelinux peppelinux changed the title [additional feature] Add attribute policy filters and modfiers [additional feature] Add attribute policy filters and modifiers Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant