Question

We use dynamo administration of ATG frequently to test the changes done to various other components. Is there any way to disable login for opening Dynamo Administration? Many times we observed that it asks the credentials multiple times. Any guesses as to why it does that and how to avoid that?

Was it helpful?

Solution

After some digging in, I have found a better approach. The much simpler way of disabling the authentication is by disabling authentication in AuthenticationServlet.

To acheive this DYNAMO_HOME/localconfig/atg/dynamo/servlet/adminpipeline/AuthenticationServlet.properties file must have the content shown below.

$class=atg.servlet.pipeline.BasicAuthenticationPipelineServlet
enabled=false

Basic Authentication Pipeline Servlet is the class that is redirecting the authentication to other components, by changing enabled=false, we can disable the authentication. Changing it to true will enable the authentication as before.

Follow this link for more information: Disable DynAdmin authentication of Oracle Commerce

OTHER TIPS

I have tried it by over-riding the Authenticator and return true if a flag "allowPassThroughEnabled" is true from the configuration.

As BasicAuthenticationServlet Pipeline calls Authenticator to authenticate a user if the request comes in bearing an Authorization header with Basic authentication.

I over-rode the Authenticator component, added a boolean property

allowPassThroughEnabled

this enables/disables the authentication.

The properties file and class file look like this :

#/atg/dynamo/servlet/adminpipeline/Authenticator.properties
$class=com.myadminpipeline.CustomUserAuthorityAuthenticator
allowPassThroughEnabled=true

and the class :

package com.myadminpipeline;

import atg.servlet.pipeline.UserAuthorityAuthenticator;

public class CustomUserAuthorityAuthenticator extends
        UserAuthorityAuthenticator {


    private boolean allowPassThroughEnabled;

    public boolean isAllowPassThroughEnabled() {
        return allowPassThroughEnabled;
    }

    public void setAllowPassThroughEnabled(boolean allowPassThroughEnabled) {
        this.allowPassThroughEnabled = allowPassThroughEnabled;
    }

@Override
public boolean authenticate(String pUserId, String pPassword) {

    if (isAllowPassThroughEnabled()){
        return true;
    }

    return super.authenticate(pUserId, pPassword);
}

}

it does the job for me. you can also switch this flag true or false as per your requirement.

Hope this helps!

So far I couldn't figure out a way to do what is needed, but I have found a workaround to avoid frequent logins by enabling lazyAuthentication. By enabling lazyAuthentication feature of ATG, the login is asked only once per session. Without this feature the login is asked after every few minutes of inactivity. In order to enable this feature do the following...

  1. Navigate to $DYNAMO_HOME/localconfig/atg/dynamo
  2. Create a folder named servlet if it doesn't already exist
  3. Create a folder named adminpipeline inside servlet if it already doesn't exist
  4. Create a properties file with the name Authenticator.properties with below content in it.
    $class=atg.servlet.pipeline.UserAuthorityAuthenticator
    $scope=global
    userAuthority=/atg/dynamo/security/AdminUserAuthority
    userPath=/atg/dynamo/security/User
    lazyAthentication=true
    allowedAccounts=administrators-group
    repository=/atg/dynamo/security/AdminSqlRepository

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top