jans icon indicating copy to clipboard operation
jans copied to clipboard

fix(jans-auth-server): unexpected output of well-known/openid-configuration on first request

Open iromli opened this issue 2 years ago • 2 comments

Describe the bug

Requesting /.well-known/openid-configuration for the first time (after installation/container deployment) returns unexpected output for grant_types_supported and response_mode_supported as seen below:

{
    "grant_types_supported": [
        "RESOURCE_OWNER_PASSWORD_CREDENTIALS",
        "CLIENT_CREDENTIALS",
        "OXAUTH_UMA_TICKET",
        "DEVICE_CODE",
        "IMPLICIT",
        "AUTHORIZATION_CODE",
        "REFRESH_TOKEN"
    ],
    "response_modes_supported": [
        "FORM_POST",
        "FRAGMENT",
        "FORM_POST_JWT",
        "QUERY_JWT",
        "FRAGMENT_JWT",
        "JWT",
        "QUERY"
    ]
}

Subsequent requests to the same URL give expected output:

{
    "grant_types_supported": [                                                                                                                        
        "password",                                                                                                                                   
        "client_credentials",                                                                                                                         
        "urn:ietf:params:oauth:grant-type:uma-ticket",                                                                                                
        "urn:ietf:params:oauth:grant-type:device_code",                                                                                               
        "implicit",                                                                                                                                   
        "authorization_code",                                                                                                                         
        "refresh_token"                                                                                                                               
    ],
    "response_modes_supported": [
        "form_post",
        "fragment",
        "form_post.jwt",
        "query.jwt",
        "fragment.jwt",
        "jwt",
        "query"
    ]   
}

To Reproduce

Steps to reproduce the behavior:

  1. Install Janssen Server using jans-linux-setup
  2. Wait installation finished
  3. Make a request to https://$HOSTNAME/.well-known/openid-configuration
  4. See unexpected output of grant_types_supported and response_mode_supported
  5. Make another request to https://$HOSTNAME/.well-known/openid-configuration
  6. The output of grant_types_supported and response_mode_supported are expected

Expected behavior

Requests to /.well-known/openid-configuration should give consistent output:

{
    "grant_types_supported": [                                                                                                                        
        "password",                                                                                                                                   
        "client_credentials",                                                                                                                         
        "urn:ietf:params:oauth:grant-type:uma-ticket",                                                                                                
        "urn:ietf:params:oauth:grant-type:device_code",                                                                                               
        "implicit",                                                                                                                                   
        "authorization_code",                                                                                                                         
        "refresh_token"                                                                                                                               
    ],
    "response_modes_supported": [
        "form_post",
        "fragment",
        "form_post.jwt",
        "query.jwt",
        "fragment.jwt",
        "jwt",
        "query"
    ]   
}

Desktop (please complete the following information):

  • OS: Ubuntu 20.04/Alpine 3.16
  • Browser Firefox / cURL

Additional context

  • Both openbanking and default distribution is affected.
  • Both VM and CN installation is affected
  • Support ticket 10706

iromli avatar Aug 19 '22 19:08 iromli

Yuriy Z is out... maybe milton can look at this one?

nynymike avatar Aug 19 '22 19:08 nynymike

Looks like Milton is busy with other issue, I could look this.

jmunozherbas avatar Sep 14 '22 22:09 jmunozherbas