How admin authentication works for V3-TP2Here is how it works: Step 1 - By default, no authenticationWhen the default domain is available as part of unzipping the bundle, the domain has no authentication support. Any user can connect to its http-listeners to manage the domain. The installer can help you create a domain with proper user and password protection. asadmin create-domain too can help you create a domain that authenticates requests. The user named "anonymous" is available in case you have chosen no user and password during create-domain/installation. By default, the default-domain (one you got from unzipping web.zip or glassfish.zip) contains the same user in admin-keyfile. As long as the only user available in admin-keyfile is anonymous, there would no authentication enforced. The moment you create an additional admin user or create a domain with admin user other than anonymous, the authentication is automatically enforced. Step 2 - Situation after creating an admin userIf you have a domain that does not authenticate admin requests, the way you should start enforcing it is as follows:
AS_ADMIN_USERPASSWORD=your-admin-pass
From now on, all the commands for asadmin, all web-requests will start mandating user name and password. To specify the user name
AS_ADMIN_PASSWORD=your-admin-pass
What is protected
What is NOT protectedJMX Channel. If you have started domain with -Dcom.sun.jmxremote.port, then that will not authenticate requests from say JConsole. Caution!It uses HTTP Basic Auth. Of course, we all know it is weak form of security. So, this should not be confused with TP-2 domain/server being "secure". |