Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

Add relay state config in SAML

Avatar

Level 4

Hi,

I need to add relaystate property so should I add property "saml.sp.use.relaystate": true in SAML Authentication Handler configuration file

 

com.adobe.granite.auth.saml.SamlAuthenticationHandler~okta.saml.cfg.json:
......

 "addGroupMemberships": true,
  "defaultGroups": ["administrators"],
  "saml.sp.use.relaystate": true
}


or should i add in


userAuthService.java:
...............................

boolean useRelayState = true;

    @ObjectClassDefinition(name = "dCloud UserAuthService Config", description = "OSGi Service providing UserAuthService config")
    @interface Config {

        @AttributeDefinition(name = "Login Redirection Path", description = "Login Redirection Path")
        String loginRedirectionPath() default "xxx";
        @AttributeDefinition(name = "Forbidden Path", description = "Forbidden Path")
        String forbiddenPath() default "/en/forbidden.html";
        boolean useRelayState() default true;

    }

    @Activate
    protected void activate(Config config) {
        loginRedirectionPath = config.loginRedirectionPath();
        forbiddenPath = config.forbiddenPath();
        useRelayState = config.useRelayState();
    }

let me know which one is correct?


Thanks in advance

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

 

It depends on how you want to configure your SAML setup.

Option 1 will limit your configurations to a specific scope. Typically, the OSGi configuration will be associated with a specific RUNMODE and a particular SAML configuration, such as Okta in your case.

On the other hand, Option 2 defaults the configuration for any other SAML implementation. This means that if you add a new SAML configuration, it will inherit the default configuration you've set up.

 

Hope this helps.

 



Esteban Bustamante

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi,

 

It depends on how you want to configure your SAML setup.

Option 1 will limit your configurations to a specific scope. Typically, the OSGi configuration will be associated with a specific RUNMODE and a particular SAML configuration, such as Okta in your case.

On the other hand, Option 2 defaults the configuration for any other SAML implementation. This means that if you add a new SAML configuration, it will inherit the default configuration you've set up.

 

Hope this helps.

 



Esteban Bustamante

Avatar

Community Advisor

Hi @tatrived 

Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Arun Patidar

Avatar

Level 1

I tried to use "saml.sp.use.relaystate"true for relay state redirection but it is not working. Post Authentication the user is landing on the home page of the application despite relay state being present in the URL. Any additional configuration is needed?