这是indexloc提供的服务,不要输入任何密码
Skip to content

Parse teams with saml configs containing access group objects as role values #264

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

Merged
merged 4 commits into from
Jan 30, 2025

Conversation

jarneson
Copy link
Member

With certain permissions on the Vercel token, a get team request can return JSON that looks like:

{
  ...
  "saml": {
    ...
    "roles": {
      "a": { "accessGroupId": "b" }
    }
  },
  ...

This fails to parse because we are expecting only JSON of the form:

{
  ...
  "saml": {
    ...
    "roles": {
      "a": "ROLE"
    }
  },
  ...

This PR parses both forms and only exposes the role based form. Since we use PATCH for updating these states, it should be non-destructive when omitting this information coming from the API.

@jarneson jarneson merged commit f5a2138 into main Jan 30, 2025
6 checks passed
@jarneson jarneson deleted the parse-saml-access-groups branch January 30, 2025 22:11
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

Successfully merging this pull request may close these issues.

2 participants