SingleSignOnServiceProviderBundle icon indicating copy to clipboard operation
SingleSignOnServiceProviderBundle copied to clipboard

SSO 0.1 _target_path redirect failed

Open cyerogy opened this issue 5 years ago • 1 comments

Hi, This is the PHP and Symfony version information

  1. php version 5.5.9
  2. symfony 2.6 composer.json
   "korotovsky/sso-sp-bundle": "0.1.0",
   "korotovsky/sso-idp-bundle": "0.1.0"

/app/config/config.yml

krtv_single_sign_on_identity_provider:
    host:             127.0.0.1:8000
    host_scheme:      http

    login_path:       /sso/login/

krtv_single_sign_on_service_provider:
    host:                 127.0.0.1:8000
    host_scheme:          http

    login_path:           /sso/login/

/app/config/routing.yml

sso:
    resource: .
    type:     sso
otp:
    path: /otp/validate/
    defaults: { _controller: pyxisxBundle:Opt:validate }

/app/config/security.yml

   providers:
        administrators:
            entity: { class: pyxis\xBundle\Entity\Security\User, property: username }
    firewalls:
        main:
            pattern: ^/
            sso:
                require_previous_session: false
                provider:                 administrators
                check_path:               /otp/validate/ # Same as in app/config/routing.yml

                sso_scheme:       http              # Required
                sso_host:         127.0.0.1:8000   # Required
                sso_failure_path: /login
                sso_path:         /sso/login/       # SSO endpoint on IdP.
access_control:
        - { path: ^/otp/validate/, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/sso/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }

When my browser address is 127.0.0.1:8000, the address is redirected and the redirected address is http://127.0.0.1:8000/sso/login/?_target_path=http%3A%2F%2F127.0.0.1%3A8000%2Fotp%2Fvalidate%2F%3F_target_path%3Dhttp%253A%252F%252F127.0.0.1%253A8000%252Fotp%252Fvalidate%252F%253F_target_path%253Dhttp%25253A%25252F%25252F127.0.0.1%25253A8000%25252Fotp%25252Fvalidate%25252F%25253F_target_path%25253Dhttp%2525253A%2525252F%2525252F127.0.0.1%2525253A8000%2525252Fotp%2525252Fvalidate%2525252F%2525253F_target_path%2525253Dhttp%252525253A%252525252F%252525252F127.0.0.1%252525253A8000%252525252Fotp%252525252Fvalidate%252525252F%252525253F_target_path%252525253Dhttp%25252525253A%25252525252F%25252525252F127.0.0.1%25252525253A8000%25252525252Fotp%25252525252Fvalidate%25252525252F%25252525253F_target_path%25252525253Dhttp%2525252525253A%2525252525252F&_hash=qS1aZmPbmH86aLypRGDFH0hZVhUiOY86gHCPj0JNNEE%3D And browser error messages redirection too many times Could you tell me what the problem is?

cyerogy avatar Nov 10 '20 02:11 cyerogy

Hi,

Most likely it's an issue of the OTP validation between SP and IdP on the server level, I'd check it.

korotovsky avatar Nov 16 '20 16:11 korotovsky