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

fix: missing fields when creating OIDC clients #3213

Closed
moabu opened this issue Dec 5, 2022 · 3 comments · Fixed by #3413
Closed

fix: missing fields when creating OIDC clients #3213

moabu opened this issue Dec 5, 2022 · 3 comments · Fixed by #3413
Assignees
Labels
kind-bug Issue or PR is a bug in existing functionality

Comments

@moabu
Copy link
Member

moabu commented Dec 5, 2022

When creating a new OIDC client, following fields are not considered (the newly created client does not have the attributes set when loading it):

  • displayName
  • claims

Request:

{
  "inum": "1201.d52300ed-8193-510e-b31d-5829f4af346e",
  "displayName": "test-client",
  "redirectUris": [
    "https://moabu-21f13b7c-9069-ad58-5685-852e6d236020.gluu.info/.well-known/scim-configuration"
  ],
  "claims": [
    "sub"
  ],
  "baseDn": "inum=1201.d52300ed-8193-510e-b31d-5829f4af346e,ou=clients,o=jans"
}

Response:

{
  "dn": "inum=1201.d52300ed-8193-510e-b31d-5829f4af346e,ou=clients,o=jans",
  "deletable": false,
  "clientSecret": "4691e5f8-9e31-40e8-8ebe-f3e620584b1a",
  "frontChannelLogoutSessionRequired": false,
  "redirectUris": [
    "https://moabu-21f13b7c-9069-ad58-5685-852e6d236020.gluu.info/.well-known/scim-configuration"
  ],
  "grantTypes": [],
  "applicationType": "web",
  "clientNameLocalized": {},
  "logoUriLocalized": {},
  "clientUriLocalized": {},
  "policyUriLocalized": {},
  "tosUriLocalized": {},
  "subjectType": "public",
  "tokenEndpointAuthMethod": "client_secret_basic",
  "trustedClient": false,
  "persistClientAuthorizations": false,
  "includeClaimsInIdToken": false,
  "customAttributes": [
    {
      "name": "displayNameLocalized",
      "multiValued": true,
      "values": [
        "{}"
      ],
      "displayValue": "{}",
      "value": "{}"
    },
    {
      "name": "jansClntURILocalized",
      "multiValued": true,
      "values": [
        "{}"
      ],
      "displayValue": "{}",
      "value": "{}"
    },
    {
      "name": "jansLogoURILocalized",
      "multiValued": true,
      "values": [
        "{}"
      ],
      "displayValue": "{}",
      "value": "{}"
    },
    {
      "name": "jansPolicyURILocalized",
      "multiValued": true,
      "values": [
        "{}"
      ],
      "displayValue": "{}",
      "value": "{}"
    },
    {
      "name": "jansTosURILocalized",
      "multiValued": true,
      "values": [
        "{}"
      ],
      "displayValue": "{}",
      "value": "{}"
    }
  ],
  "rptAsJwt": false,
  "accessTokenAsJwt": false,
  "disabled": false,
  "attributes": {
    "runIntrospectionScriptBeforeJwtCreation": false,
    "keepClientAuthorizationAfterExpiration": false,
    "allowSpontaneousScopes": false,
    "backchannelLogoutSessionRequired": false,
    "parLifetime": 600,
    "requirePar": false,
    "jansDefaultPromptLogin": false,
    "minimumAcrLevel": -1
  },
  "authenticationMethod": "client_secret_basic",
  "baseDn": "inum=1201.d52300ed-8193-510e-b31d-5829f4af346e,ou=clients,o=jans",
  "inum": "1201.d52300ed-8193-510e-b31d-5829f4af346e"
}
@moabu moabu self-assigned this Dec 5, 2022
@mo-auto mo-auto added the kind-bug Issue or PR is a bug in existing functionality label Dec 5, 2022
@moabu moabu assigned pujavs and unassigned moabu Dec 6, 2022
@pujavs
Copy link
Contributor

pujavs commented Dec 12, 2022

@moabu, following is the analysis and testing

Testing with correct values:
image

Please let me know in-case of any concern.

@moabu
Copy link
Member Author

moabu commented Dec 12, 2022

Thanks @pujavs for clarifying . I think we can close this . I'll reopen if needed .

@pujavs
Copy link
Contributor

pujavs commented Dec 26, 2022

@moabu, implemented enhancement to be able to provide claims as Dn as well as name while creation and update
Though in DB, claimDN will always be persisted, but the caller will get the claims in the format sent in request.
Also validation added to check and throw error in-case the claim is invalid.
PR 3413

Testing:
OpenId_Client_Claim.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind-bug Issue or PR is a bug in existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants