AbsaOSS / login-service

AbsaOSS Common Login gateway using JWT Public key signatures
Apache License 2.0
2 stars 0 forks source link

Groups filtering #42

Closed dk1844 closed 1 year ago

dk1844 commented 1 year ago

Background

It may happen, that a user's list of groups is too long. Both in practicality and in terms of token being too large to save in limited spaces (4K limit for cookies for example).

For this reason, it may be useful to request user token with an optional filtering field that will limit the groups to the set of interested values.

Feature

Provide /token/generate rest call (either introduce an optional param there or create another endpoint) where groups filter can be employed.

Consider the practical options for filtering. From the practical standpoint, prefix filtering should be enough.

Example [Optional]

/token/generate?group-prefix=abcd- /token/generate?group-prefix=abcd-|efgh-|something-else- (/token/generate?group-suffix=-admin) (/token/generate?group-contains=-ursa-unify-) (/token/generate?group-regex=\d{4}-\d\d-\d\d)

(just ideas, not all of these need to be implemented if not needed)

dk1844 commented 1 year ago

New usecase added to the issue: multiple prefixes to be given at once, e.g. /token/generate?group-prefix=abcd-|efgh-|something-else-

@kevinwallimann thanks for the usecase