SAP Knowledge Base Article - Preview

3791808 - asm login returns 403 forbidden on composable storefront in SAP Commerce Cloud 2211-jdk21

Symptom

  • ASM login returns HTTP 403 Forbidden on POST /authorizationserver/login.
  • Login page renders and includes a hidden _csrf field; request payload contains username, password, and _csrf, yet the request is rejected.
  • Error message is as below:

    Exception:
    org.springframework.beans.factory.NoSuchBeanDefinitionException
    Message:
    No bean named 'org.springframework.security.filterChainProxy' available


    Exception:
    javax.servlet.http.HttpServletResponse.sendError
    Message:
    HTTP 403 Forbidden

    Exception:
    org.springframework.beans.factory.NoSuchBeanDefinitionException
    Message:
    No bean named 'org.springframework.security.filterChainProxy' available

    Exception:
    org.springframework.security.web.csrf.MissingCsrfTokenException
    Message:
    Could not verify the provided CSRF token because no token was found to compare.
    ......

  • Here's the details of the GET and POST /authorizationserver/login request.

    Request URL:https://******/authorizationserver/login
    Request Method:GET
    Cookie:
    JSESSIONID  *******.<api_pod1>  
    ROUTE   .<api_pod1>  
    ROUTE   .<jsapps_pod1>  


    <!DOCTYPE html>
    <html lang="en">
    <head>
        <title>Login</title>

        <link href="/authorizationserver/static/fundamental-styles/fundamental-styles.css" rel="stylesheet">
        <link href="/authorizationserver/static/fundamental-styles/theming/sap_horizon.css" rel="stylesheet">
        <link href="/authorizationserver/static/fundamental-styles/theming/sap_horizon/css_variables.css" rel="stylesheet">
        <link href="/authorizationserver/static/authorizationserver-webapp.css" rel="stylesheet" media="screen, projection">
        <script></script>
    </head>
    <body>
    <div id="loginDialogContainer">
        <div id="loginDialogContent" class="fd-dialog__content">
            <div id="loginWrapper">     
                <form id="loginForm" method="post" action="/authorizationserver/login">
                    <div id="loginFormHeader" class="fd-dialog__header">
                        <img id="loginLogo" title="Logo" src="static/images/SAP_R_grad.svg" alt="logo"
                             width="60" height="30">
                        <h2 id="loginTitle">Sign In</h2>
                    </div>
                    <div id="loginFormBody" class="fd-dialog__body">    
                        <div class="fd-form-item">       
                            <label id="usernameLabel" for="username" class="fd-form-label">Email or User name</label>
                            <input type="text" id="username" name="username" class="form-control fd-input"
                                   placeholder="Email or User name" required autofocus autocomplete="username"
                                   data-required-msg="Please fill in user name.">
                        </div>
                        <div class="fd-form-item">   
                            <label id="passwordLabel" for="password" class="fd-form-label">Password</label>
                            <input type="password" id="password" name="password" class="form-control fd-input"
                                   placeholder="Password" required autocomplete="current-password"
                                   data-required-msg="Please fill in password.">
                        </div>
                    </div>
                    <div id="loginFormFooter" class="fd-dialog__footer">
                        <div class="fd-bar__right">
                            <button id="submit" class="fd-button fd-button--emphasized" type="submit">Continue</button>
                            <input type="hidden" name="_csrf" value="<masked_csrftoken_value>" />
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    </body>
    </html>

    Request URL:https://******/authorizationserver/login
    Request Method:POST
    payload:username=<masked>&password=<masked>&_csrf=<masked_csrftoken_value>

    Cookie:
    JSESSIONID  4B4661B5E44D3F6B08040F1114B1D655.<api_pod2>   
    ROUTE   .<api_pod2>   
    ROUTE   .<jsapps_pod2>   


          <!DOCTYPE html>
            <html lang="en">
            <head>
                <meta charset="utf-8"/>
                <title>HTTP Status 403 - Forbidden</title>    
                <link href="/authorizationserver/static/fundamental-styles/fundamental-styles.css" rel="stylesheet">
                <link href="/authorizationserver/static/fundamental-styles/theming/sap_horizon.css" rel="stylesheet">
                <link href="/authorizationserver/static/fundamental-styles/theming/sap_horizon/css_variables.css" rel="stylesheet">
                <link href="/authorizationserver/static/authorizationserver-webapp.css" rel="stylesheet">
            </head>
            <body>
            <div class="fd-message-page">
                <div class="fd-message-page__container">
                    <div class="fd-message-page__icon-container">
                        <i role="presentation" class="sap-icon--status-error fd-message-page__icon"></i>
                    </div>
                    <div class="fd-message-page__title">403 - Forbidden</div>
                </div>
            </div>
            </body>
            </html>


    Read more...

    Environment

    SAP Commerce Cloud

    Product

    SAP Commerce Cloud 2211 for JDK21

    Keywords

    asm, 403 forbidden, csrf, missingcsrftokenexception, authorizationserver, login, custom login page, composable storefront, sticky session, route cookie, jsessionid, multi pod, load balancer, cdn, oauth , KBA , CEC-SCC-COM-AS , Assisted Services , Problem

    About this page

    This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

    Search for additional results

    Visit SAP Support Portal's SAP Notes and KBA Search.