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

Add token/userinfo claims to account read output #1419

Merged
merged 2 commits into from
Jul 26, 2021

Conversation

jefferai
Copy link
Member

@jefferai jefferai commented Jul 26, 2021

This is very useful when trying to write managed groups filters as you can directly look at the structure of the claims for the accounts you're trying to filter.

The output of the claims in text format on the CLI currently leaves something to be desired (see example below). I started revamping some of the formatting functions and it quickly got very fragile. Fundamentally at this point we're likely better off -- now that we have a good idea what our output format/standards are like -- rewriting the formatting code. I'll take that as a tasker as I have a lot of ideas...

  Attributes:
    email:             admin@localhost
    full_name:         Admin User
    issuer:            http://127.0.0.1:38453
    subject:           admin
    token_claims:
    {
    "at_hash": "EdDSA-hash",
    "aud": [
    "zziZuCmjAft9k4o17qok"
    ],
    "auth_time": 1627322774,
    "azp": "zziZuCmjAft9k4o17qok",
    "exp": 1627322779,
    "iat": 1627322774,
    "iss": "http://127.0.0.1:38453",
    "mode": "dev",
    "nbf": 1627322769,
    "nonce": "GXG5KJX2GjSHGIXB0jIy",
    "sub": "admin"
    }
    userinfo_claims:
    {
    "email": "admin@localhost",
    "name": "Admin User",
    "sub": "admin"
    }

This is very useful when trying to write managed groups filters as you
can directly look at the structure of the claims for the accounts you're
trying to filter.

The output of the claims in text format on the CLI currently leaves
something to be desired. I started revamping some of the formatting
functions and it quickly got very fragile. Fundamentally at this point
we're likely better off -- now that we have a good idea what our output
format/standards are like -- rewriting the formatting code. I'll take
that as a tasker as I have a lot of ideas...
@jefferai jefferai force-pushed the jeff-output-claims-from-oidc-accounts branch from cecc7b3 to cc8c280 Compare July 26, 2021 18:07
Copy link
Contributor

@talanknight talanknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@jefferai jefferai merged commit 528d54b into main Jul 26, 2021
@jefferai jefferai deleted the jeff-output-claims-from-oidc-accounts branch July 26, 2021 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants