Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we add security Realm to glassfish-resources

Hi I am currently using JDBC realm in Glassfish 4.1.1 for authentication, and I wonder if I can add the configuration of jdbc realm to glassfish-resources.xml, so that when migrate, I can just call

 asadmin add-resources glassfish-resources.xml 

to add all jdbc connection, datasources, and jdbcRealm to the new glassfish server?

like image 339
Thang Pham Avatar asked Oct 05 '16 02:10

Thang Pham


1 Answers

No, you cannot configure the security realm in glassfish-resouces.xml. See the DTD, there is no element for that. There is a feature request open for that, see GLASSFISH-20874.

You can use a shellscript and the asadmin commands to do automatic configuration for all your resources or just for the security realm (create-auth-realm). Or use the REST-configuration interface.

Sources:

https://stackoverflow.com/a/19546431/5658642
https://stackoverflow.com/a/7855104/5658642

like image 88
beat Avatar answered Nov 13 '22 18:11

beat