How can I determine Loginmodule from asadmin Glassfish?

I am currently implementing the Glassfish area under neo4j DB support, for which I have defined the Realm class and LoginModule .

I can set the scope using the create-auth-realm asadmin . But the scope is recognized by Glassfish only if it is associated with the LoginModule defined in the config/login.conf .

For example, in my case, I should do the following:

  • Create an authentication scope:
    create-auth-realm --classname com.mycompany.security.MyRealm --property jaas-context=MyLoginModule myrealm and then

  • Define MyLoginModule in this config/login.conf :

     MyLoginModule { fr.mycompany.security.MyLoginModule required; }; 

I can edit the login.conf file manually, but would like to use the asadmin command to automate this step.
Do you know about such an asadmin command?

+4
source share
1 answer

It seems that the CLI Glassfish does not currently support this.

Quote from here :

glass fish have a pretty good CLI (which is actually one of the reasons why I switched from JBoss). However, for the cmd CLI, there is no change to the login.conf name of the instance (i.e., adding / removing entries in a reliable way).

I am wondering why a region is not added / deleted automatically to / from login.conf when you create / delete a region using create-auth-realm / delete-auth-realm ...

I have been requested to update.

+3
source

Source: https://habr.com/ru/post/1435934/


All Articles