Uploaded image for project: 'Red Hat Internal Developer Platform'
  1. Red Hat Internal Developer Platform
  2. RHIDP-4618

Unable to get UserProfile details in accesstoken issued by RHDH as part of authProvider Module

Prepare for Y ReleasePrepare for Z ReleaseRemove QuarterXMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      Description of problem:

      RHDH default AuthResolver only provides token without ProfileInfo as below:
      async function signInWithCatalogUserOptional(
        name: string | AuthResolverCatalogUserQuery,
        ctx: AuthResolverContext,
      ) {
        try {
          const query: AuthResolverCatalogUserQuery =
            typeof name === 'string'
              ?

      {             entityRef: \{ name }

      ,
                }
              : name;
          const signedInUser = await ctx.signInWithCatalogUser(query);
          return Promise.resolve(signedInUser);
        }

      In Backstage community edition we are able to retrieve userProfile details after successful authentication upon token issuance as below:

      AuthResolverContext.issueToken({
                      claims:

      {                   sub: userRef, // The user's own identity                   ent: [userRef[0]], // A list of identities that the user claims ownership through                   email: emailId,                   profile: profileInfo,                 }

      ,

      Prerequisites (if any, like setup, operators/versions):

      Steps to Reproduce

      1. <steps>

      Actual results:

      Expected results:

      Need the capability to get User Profile Information as well as part of the token with below details with default AppResolverContext :
      "profile": {
          "email": "xyz@abc.com",
          "displayName": "xyz",
          "picture": "image_url"
        },
      We need this for OIDC authentication scenario.

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Build Details:

      RHDH 1.2

      Additional info (Such as Logs, Screenshots, etc):

            rh-ee-jhe Jessica He
            jalmehta@in.ibm.com Jaladhi Mehta
            RHIDP - Security
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: