Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 1 | type=page |
| 2 | status=published |
| 3 | title=Managing Administrative Security |
| 4 | next=running-in-secure-environment.html |
| 5 | prev=security-in-cluster-mode.html |
| 6 | ~~~~~~ |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 7 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 8 | = Managing Administrative Security |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 9 | |
| 10 | [[GSSCG00039]][[gknqh]] |
| 11 | |
| 12 | |
| 13 | [[managing-administrative-security]] |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 14 | == 5 Managing Administrative Security |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 15 | |
| 16 | This chapter describes how to manage administrative security by using |
| 17 | the secure administration feature. |
| 18 | |
| 19 | This chapter assumes that you are familiar with security features such |
| 20 | as authentication, authorization, and certificates. If you are not, |
| 21 | first see link:system-security.html#ablnk[Administering System Security]. |
| 22 | |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 23 | Instructions for accomplishing the tasks specific to {productName} by |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 24 | using the Administration Console are contained in the Administration |
| 25 | Console online help. |
| 26 | |
| 27 | * link:#gkocp[Secure Administration Overview] |
| 28 | * link:#gkofl[How Secure Admin Works: The Big Picture] |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 29 | * link:#gkofe[Considerations When Running {productName} With Default Security] |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 30 | * link:#gkomz[Running Secure Admin] |
| 31 | * link:#gkolu[Additional Considerations When Creating Local Instances] |
| 32 | * link:#gkqah[Secure Admin Use Case] |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 33 | * link:#gkodn[Upgrading an SSL-Enabled Secure GlassFish Installation to Secure Admin] |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 34 | |
| 35 | [[gkocp]][[GSSCG00162]][[secure-administration-overview]] |
| 36 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 37 | === Secure Administration Overview |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 38 | |
| 39 | The secure administration feature allows an administrator to secure all |
| 40 | administrative communication between the domain administration server |
| 41 | (DAS), any remote instances, and administration clients such as the |
| 42 | `asadmin` utility, the administration console, and REST clients. |
| 43 | |
| 44 | In addition, secure administration helps to prevent DAS-to-DAS and |
| 45 | instance-to-instance traffic, and carefully restricts |
| 46 | administration-client-to-instance traffic. |
| 47 | |
| 48 | The secure administration feature, which is henceforth referred to as |
| 49 | secure admin, provides a secure environment, in which you can be |
| 50 | confident that rogue users or processes cannot intercept or corrupt |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 51 | administration traffic or impersonate legitimate {productName} components. |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 52 | |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 53 | When you install {productName} or create a new domain, secure admin |
| 54 | is disabled by default. When secure admin is disabled, {productName} |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 55 | does not encrypt administrative communication among the system |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 56 | components and does not accept administrative connections from remote hosts. |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 57 | |
| 58 | The following subcommands enable and disable secure admin: |
| 59 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 60 | * enable-secure-admin + |
| 61 | The `enable-secure-admin` subcommand turns on |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 62 | secure admin. {productName} uses SSL encryption to protect subsequent |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 63 | administrative traffic and will accept remote administrative |
| 64 | connections. Enabling secure admin affects the entire domain, including |
| 65 | the DAS and all instances. The DAS must be running, and not any |
| 66 | instances, when you run `enable-secure-admin`. You must restart the DAS |
| 67 | immediately after enabling secure admin, and then start any instances |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 68 | you want to run. |
| 69 | + |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 70 | [NOTE] |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 71 | ==== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 72 | The `enable-secure-admin` subcommand fails if any administrative user |
| 73 | has a blank password. |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 74 | ==== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 75 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 76 | * disable-secure-admin + |
| 77 | The `disable-secure-admin` subcommand turns off |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 78 | secure admin. {productName} no longer encrypts administrative |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 79 | messages and will no longer accept remote administration connections. |
| 80 | Disabling secure admin affects the entire domain, including the DAS and |
| 81 | all instances. The DAS must be running , and not any instances, when you |
| 82 | run `disable-secure-admin`. You must restart the DAS immediately after |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 83 | disabling secure admin, and then start any instances you want to run. |
| 84 | + |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 85 | If secure admin is not enabled, this subcommand has no effect. |
| 86 | |
| 87 | This section describes how to use these commands to run secure admin, |
| 88 | and the implications of doing so. |
| 89 | |
| 90 | [[gkofl]][[GSSCG00163]][[how-secure-admin-works-the-big-picture]] |
| 91 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 92 | === How Secure Admin Works: The Big Picture |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 93 | |
| 94 | Secure admin is a domain-wide setting. It affects the DAS and all |
| 95 | instances and all administration clients. This section describes the |
| 96 | following topics: |
| 97 | |
| 98 | * link:#gkqce[Functions Performed by Secure Admin] |
| 99 | * link:#gkocv[Which Administration Account is Used?] |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 100 | * link:#gkodi[What Authentication Methods Are Used for Secure Administration?] |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 101 | * link:#gkpex[Understanding How Certificate Authentication is Performed] |
| 102 | * link:#gkoey[What Certificates Are Used?] |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 103 | * link:#glgmy[An Alternate Approach: Using Distinguished Names to Specify Certificates] |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 104 | * link:#gkqjj[Guarding Against Unwanted Connections] |
| 105 | |
| 106 | [[gkqce]][[GSSCG00227]][[functions-performed-by-secure-admin]] |
| 107 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 108 | ==== Functions Performed by Secure Admin |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 109 | |
| 110 | The `enable-secure-admin` subcommand performs the following functions. |
| 111 | Subsequent sections describe these functions in more detail. |
| 112 | |
| 113 | * Enables the secure admin behavior, optionally setting which aliases |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 114 | are to be used for identifying the DAS and instance certificates. |
| 115 | |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 116 | * Adjusts all configurations in the domain, including default-config. |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 117 | |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 118 | * Adjusts Grizzly settings: |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 119 | ** SSL/TLS is enabled in the DAS's admin listener and the instances' |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 120 | admin listeners. |
| 121 | ** Port unification (that is, HTTP and HTTPS are handled by the same port), |
| 122 | http—to—https redirection, and client authentication |
| 123 | (client-auth=want) are enabled. |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 124 | ** Configures SSL to use the administration truststore. |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 125 | ** Configures SSL to use the administration keystore and the correct |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 126 | alias (for the self-signed cert) for authenticating itself. |
| 127 | (You can use your own certificate instead, as described in link:#gkped[ |
| 128 | Using Your Own Certificates]. |
| 129 | |
| 130 | + |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 131 | The Grizzly configuration on the DAS and each instance is identical, |
| 132 | with the exception that the DAS uses the `s1as` alias for SSL/TLS |
| 133 | authentication and the instances use the `glassfish-instance` alias. |
| 134 | (These alias names are the default, and you can change them.) + |
| 135 | A server restart is required to change the Grizzly adapter behavior. + |
| 136 | The restart also synchronizes the restarted instances. When you start |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 137 | the instances, the DAS delivers the updated configuration to the instances. |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 138 | |
| 139 | [[gkocv]][[GSSCG00228]][[which-administration-account-is-used]] |
| 140 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 141 | ==== Which Administration Account is Used? |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 142 | |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 143 | If only one administration account exists in the realm, {productName} |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 144 | treats that account as the current default administration account. In |
| 145 | this case, when you run an `asadmin` command, you do not need to specify |
| 146 | the username. If a password for that username is required, you need to |
| 147 | specify it, typically by using the `--passwordfile` option or by letting |
| 148 | `asadmin` prompt you for it. |
| 149 | |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 150 | By default, {productName} includes a single account for user "admin" |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 151 | and an empty password. Therefore, if you make no other changes before |
| 152 | you enable secure admin, "admin" is the initial default username and no |
| 153 | password is required. You need to decide whether enabling secure admin |
| 154 | without also requiring a password makes sense in your environment. |
| 155 | |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 156 | If multiple admin accounts exist, then {productName} does not |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 157 | recognize any admin username as the default. You must then specify a |
| 158 | valid username via the `-—user` option when you use the `asadmin` |
| 159 | command (or by or defining the `AS_ASDMIN_USER` environment variable), |
| 160 | and its associated password (if the associated password is not empty). |
| 161 | |
| 162 | The username and password used for a login attempt must match the |
| 163 | username and password (if required) for an account defined in the realm, |
| 164 | and you must have set up the account as a member of the admin group. |
| 165 | |
| 166 | [[gkodi]][[GSSCG00229]][[what-authentication-methods-are-used-for-secure-administration]] |
| 167 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 168 | ==== What Authentication Methods Are Used for Secure Administration? |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 169 | |
| 170 | The secure admin feature enforces security via the following |
| 171 | authentication methods: |
| 172 | |
| 173 | * The DAS and instances authenticate to each other via mutual (two-way) |
| 174 | SSL/TLS certificate authentication. The DAS authenticates to clients via |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 175 | one-way SSL/TLS certificate authentication. |
| 176 | + |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 177 | The domain creation process creates a default keystore and truststore, |
| 178 | plus a default private key for the DAS. Secure admin uses this initial |
| 179 | configuration to set up the truststore so that the DAS and instances |
| 180 | always trust each other. |
| 181 | * Remote administration clients (`asadmin`, administration console, |
| 182 | browsers, and IDEs) must accept the public certificate presented by the |
| 183 | DAS. If accepted, remote administration clients then send a user name |
| 184 | and password (HTTP Basic authentication) in the HTTP Authorization |
| 185 | header. The receiving DAS or instance makes sure those credentials are |
| 186 | valid in its realm, and authenticates and authorizes the user. |
| 187 | * A locally-running `asadmin` (that is, connecting to an instance on the |
| 188 | same host) authenticates and authorizes to the co-located instance using |
| 189 | a locally-provisioned password. |
| 190 | * Credentials or other sensitive information sent over the network are |
| 191 | always encrypted if secure admin is enabled. No credentials are sent in |
| 192 | the clear if secure admin is enabled. (If secure admin is disabled, |
| 193 | credentials are sent in the clear.) Messages between administration |
| 194 | clients and the DAS, between the DAS and remote instances, and between |
| 195 | local administration clients and instances are encrypted using SSL/TLS. |
| 196 | This is true even if you explicitly set the `asadmin` `-—secure` option |
| 197 | to false. |
| 198 | |
| 199 | link:#gkobl[Table 5-1] shows which authentication methods are employed |
| 200 | when secure admin is enabled or disabled. |
| 201 | |
| 202 | [[sthref35]][[gkobl]] |
| 203 | |
| 204 | Table 5-1 Authentication Methods Employed |
| 205 | |
| 206 | [width="100%",cols="30%,30%,40%",options="header",] |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 207 | |=== |
| 208 | |Access Method |When Secure Admin is Disabled |When Secure Admin is Enabled |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 209 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 210 | |Remote administration access to the DAS |
| 211 | |Rejected. |
| 212 | |Username/password authentication. (Client must also accept server certificate.) |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 213 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 214 | |Communication between DAS and instances |
| 215 | |Cleartext messages. No mutual authentication. |
| 216 | |SSL-encrypted messages. SSL mutual authentication using certificates. |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 217 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 218 | |Communication between administration clients and DAS |
| 219 | |Cleartext messages. No DAS authentication. |
| 220 | |SSL-encrypted messages. DAS uses SSL certificate server authentication. |
| 221 | |
| 222 | |Local asadmin client to instance on same node |
| 223 | |Cleartext messages. Locally-provisioned password mechanism is used. |
| 224 | |SSL-encrypted messages. Locally-provisioned password mechanism is used. |
| 225 | |=== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 226 | |
| 227 | |
| 228 | [[gkpex]][[GSSCG00230]][[understanding-how-certificate-authentication-is-performed]] |
| 229 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 230 | ==== Understanding How Certificate Authentication is Performed |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 231 | |
| 232 | The domain creation process creates a primary (private) key and a |
| 233 | self-signed certificate for the DAS, and a separate private key and |
| 234 | self-signed certificate for remote instances. |
| 235 | |
| 236 | Then, when you enable secure admin, the following actions are performed: |
| 237 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 238 | * Both private keys are stored in the domain-wide DAS keystore file, keystore.jks. |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 239 | * Both public certificates are stored in the domain-wide DAS truststore |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 240 | file, cacerts.jks. |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 241 | |
| 242 | When the DAS sends a message to an instance: |
| 243 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 244 | 1. SSL on the instance asks the DAS to provide an SSL/TLS certificate. |
| 245 | 2. The DAS sends the certificate with the alias you specified using the |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 246 | `--adminalias` option when you ran the `enable-secure-admin` subcommand. |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 247 | 3. SSL on the instance makes sure the certificate is valid and |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 248 | {productName} makes sure that the security Principal associated with |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 249 | the incoming request (provided automatically by Grizzly and the SSL/TLS |
| 250 | Java implementation) matches the Principal associated with the |
| 251 | adminalias from the instance's truststore. |
| 252 | |
| 253 | [[gkoey]][[GSSCG00231]][[what-certificates-are-used]] |
| 254 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 255 | ==== What Certificates Are Used? |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 256 | |
| 257 | When you enable secure admin, you can optionally set the `--adminalias` |
| 258 | and `--instancealias` options that tell secure admin which aliases to |
| 259 | use for the DAS and instance certificates. |
| 260 | |
| 261 | The DAS uses the alias associated with the `--instancealias` option to |
| 262 | check incoming requests that use SSL/TLS cert authentication. |
| 263 | Conversely, instances use the alias associated with the `--adminalias` |
| 264 | option to check incoming requests with certificate authentication. |
| 265 | |
| 266 | By default, `--adminalias` of the `enable-secure-admin` subcommand uses |
| 267 | the `s1as` alias, and the `--instancealias` option uses the |
| 268 | `glassfish-instance` alias, both of which identify the default |
| 269 | self-signed certificates. |
| 270 | |
| 271 | You can use your tool of choice, such as keytool, to list the default |
| 272 | self-signed certificates in the keystore, similar to the following: |
| 273 | |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 274 | [NOTE] |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 275 | ==== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 276 | You can list the contents of the keystore without supplying a password. |
| 277 | However, for a request that affects the private key, such as the |
| 278 | keytool.exe `--certreq` option, the keystore password is required. This |
| 279 | is the master password and has a default value of changeit unless you |
| 280 | change it with the `change-master-password` subcommand. |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 281 | ==== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 282 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 283 | [source] |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 284 | ---- |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 285 | keytool.exe -list -keystore keystore.jks |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 286 | Enter keystore password: |
| 287 | |
| 288 | ***************** WARNING WARNING WARNING ***************** |
| 289 | * The integrity of the information stored in your keystore * |
| 290 | * has NOT been verified! In order to verify its integrity, * |
| 291 | * you must provide your keystore password. * |
| 292 | ***************** WARNING WARNING WARNING ***************** |
| 293 | |
| 294 | Keystore type: JKS |
| 295 | Keystore provider: SUN |
| 296 | |
| 297 | Your keystore contains 2 entries |
| 298 | |
| 299 | glassfish-instance, Jan 3, 2011, PrivateKeyEntry, |
| 300 | Certificate fingerprint (MD5): 06:A4:83:84:57:52:9C:2F:E1:FD:08:68:BB:2D:ED:E8 |
| 301 | s1as, Jan 3, 2011, PrivateKeyEntry, |
| 302 | Certificate fingerprint (MD5): 8B:7D:5A:4A:32:36:1B:5D:6A:29:66:01:B0:A3:CB:85 |
| 303 | ---- |
| 304 | |
| 305 | The `--adminalias` and `--instancealias` values are maintained. Because |
| 306 | of this design, normal instance creation operations (create-instance |
| 307 | over SSH and create-local-instance) apply the up-to-date keystore, |
| 308 | truststore, and configuration to each instance. |
| 309 | |
| 310 | [[gkpfi]][[GSSCG00201]][[self-signed-certificates-and-trust]] |
| 311 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 312 | ===== Self-Signed Certificates and Trust |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 313 | |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 314 | The self-signed certificates that {productName} uses might not be |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 315 | trusted by clients by default because a certificate authority does not |
| 316 | vouch for the authenticity of the certificate. If you enable secure |
| 317 | admin and then contact the DAS using an administration client, that |
| 318 | client will detect whether the certificate is automatically trusted. |
| 319 | |
| 320 | Browsers will warn you, let you view the certificate, and ask you to |
| 321 | reject the certificate, accept it once, or accept it indefinitely, as |
| 322 | shown in link:#gkqpv[Figure 5-1]. |
| 323 | |
| 324 | [[GSSCG00002]][[gkqpv]] |
| 325 | |
| 326 | |
| 327 | .*Figure 5-1 Sample Browser Response to Untrusted Certificate* |
| 328 | image:img/accept-certif.png[ |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 329 | "This screen shot shows how a browser might respond to an untrusted certificate."] |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 330 | |
| 331 | |
| 332 | Similarly, the first time `asadmin` receives an untrusted certificate, |
| 333 | it displays the certificate and lets you accept it or reject it, as |
| 334 | follows: (If you accept it, `asadmin` also accepts that certificate in |
| 335 | the future. ) |
| 336 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 337 | [source] |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 338 | ---- |
David Matějček | 0a14ebe | 2021-11-28 19:28:03 +0100 | [diff] [blame] | 339 | D:\glassfish7\glassfish\bin>asadmin enable-secure-admin |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 340 | Command enable-secure-admin executed successfully. |
| 341 | |
| 342 | |
David Matějček | 0a14ebe | 2021-11-28 19:28:03 +0100 | [diff] [blame] | 343 | D:\glassfish7\glassfish\bin>asadmin stop-domain domain1 |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 344 | Waiting for the domain to stop ....... |
| 345 | Command stop-domain executed successfully. |
| 346 | |
David Matějček | 0a14ebe | 2021-11-28 19:28:03 +0100 | [diff] [blame] | 347 | D:\glassfish7\glassfish\bin>asadmin start-domain domain1 |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 348 | Waiting for domain1 to start .............................. |
| 349 | Successfully started the domain : domain1 |
David Matějček | 0a14ebe | 2021-11-28 19:28:03 +0100 | [diff] [blame] | 350 | domain Location: D:\glassfish7\glassfish\domains\domain1 |
| 351 | Log File: D:\glassfish7\glassfish\domains\domain1\logs\server.log |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 352 | Admin Port: 4848 |
| 353 | Command start-domain executed successfully. |
| 354 | |
David Matějček | 0a14ebe | 2021-11-28 19:28:03 +0100 | [diff] [blame] | 355 | D:\glassfish7\glassfish\bin>asadmin list-domains |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 356 | [ |
| 357 | [ |
| 358 | Version: V3 |
| 359 | Subject: CN=machine.oracle.com, OU=GlassFish, O=Oracle Corporation, L=San |
| 360 | ta Clara, ST=California, C=US |
| 361 | Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5 |
| 362 | |
| 363 | Key: Sun RSA public key, 1024 bits |
| 364 | modulus: 916043595073784449632358756374297330881618062298549101072702252458856 |
| 365 | 74079656358328568800001548507219262910864311924824938195045822088563459253216383 |
| 366 | 21100660819657204757523896415606833471499564071226722478056407102318862796797465 |
| 367 | 6245090519956376357288295037519504394674686082145398885236913866246525691704749 |
| 368 | public exponent: 65537 |
| 369 | Validity: [From: Tue Jan 04 14:30:08 EST 2011, |
| 370 | To: Fri Jan 01 14:30:08 EST 2021] |
| 371 | Issuer: CN=machine.oracle.com, OU=GlassFish, O=Oracle Corporation, L=Sant |
| 372 | a Clara, ST=California, C=US |
| 373 | SerialNumber: [ 4d237540] |
| 374 | |
| 375 | Certificate Extensions: 1 |
| 376 | [1]: ObjectId: 2.5.29.14 Criticality=false |
| 377 | SubjectKeyIdentifier [ |
| 378 | KeyIdentifier [ |
| 379 | 0000: AF 8B 90 1E 51 9A 80 1B EB A4 D9 C6 01 8A A0 FD ....Q........... |
| 380 | 0010: DE EC 83 8A .... |
| 381 | ] |
| 382 | ] |
| 383 | |
| 384 | ] |
| 385 | Algorithm: [SHA1withRSA] |
| 386 | Signature: |
| 387 | 0000: 3F 2B 30 CE 97 0B 5E F3 72 0E 60 18 8D 3B 04 DC ?+0...^.r.`..;.. |
| 388 | 0010: 26 E6 7A 6F D0 19 CC 26 1D 90 C0 DE 33 4E 53 FB &.zo...&....3NS. |
| 389 | 0020: DC E7 AE 78 9E BA EF 14 86 57 36 D4 3E 9B C9 FB ...x.....W6.>... |
| 390 | 0030: C0 B4 EF 72 27 D9 4F 79 1F 89 91 B8 96 26 33 64 ...r'.Oy.....&3d |
| 391 | 0040: 9F 4B 04 4B 83 B9 BF 4D 54 B4 8F 75 17 1A 51 BD .K.K...MT..u..Q. |
| 392 | 0050: F3 69 94 CE 90 95 08 55 2C 07 D2 23 AC AE EC 6D .i.....U,..#...m |
| 393 | 0060: 84 B6 3D 00 FB FE 92 50 37 1A 2D 00 F1 21 5C E6 ..=....P7.-..!\. |
| 394 | 0070: 1F 39 26 B2 5D C1 FD C8 B1 4F CC EE 26 84 B8 B5 .9&.]....O..&... |
| 395 | |
| 396 | ] |
| 397 | Do you trust the above certificate [y|N] --> |
| 398 | ---- |
| 399 | |
| 400 | `asadmin` saves certificates you accept in the file `.asadmintruststore` |
| 401 | in your log-in default directory. You do not generally need to work with |
| 402 | the file directly, but if you delete or move the file, `asadmin` will |
| 403 | prompt you again when it receives untrusted certificates. |
| 404 | |
| 405 | Some `asadmin` commands such as run-script can contact an instance |
| 406 | directly to retrieve information (but not to make configuration |
| 407 | changes). The instances do not use the same certificate as the DAS, so |
| 408 | in these cases `asadmin` then prompts you to accept or reject the |
| 409 | instance certificate. |
| 410 | |
| 411 | [[gkped]][[GSSCG00202]][[using-your-own-certificates]] |
| 412 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 413 | ===== Using Your Own Certificates |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 414 | |
| 415 | By default, `--adminalias` of the `enable-secure-admin` subcommand uses |
| 416 | the `s1as` alias, and the `--instancealias` option uses the |
| 417 | `glassfish-instance` alias, both of which identify the default |
| 418 | self-signed certificates. |
| 419 | |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 420 | You can instead have {productName} use your own certificates for this |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 421 | purpose by first adding your certificates to the keystore and |
| 422 | truststore, and then running `enable-secure-admin` and specifying the |
| 423 | aliases for your certificates. |
| 424 | |
| 425 | It is also possible to use `s1as` and `glassfish-instance` as the alias |
| 426 | names for your own certificates. A benefit of doing so is that you would |
| 427 | not have to specify alias names with the `enable-secure-admin` |
| 428 | subcommand. |
| 429 | |
| 430 | In addition, your own certificate identified by the `s1as` alias would |
| 431 | be used in all other cases within the domain where the `s1as` alias is |
| 432 | used (by default), such as in the SSL configuration of the IIOP and |
| 433 | http-listener-2 listeners, and as the `encryption.key.alias` and |
| 434 | `signature.key.alias` used for provider configuration in the SOAP |
| 435 | authentication layer for Message Security configuration. |
| 436 | |
| 437 | You may find the wide-reaching effect of using the `s1as` alias with |
| 438 | your own certificate to be either a useful feature or an unintended |
| 439 | consequence. Therefore, you should understand the implications of using |
| 440 | the `s1as` alias before doing so. |
| 441 | |
| 442 | If you decide to use the `s1as` and `glassfish-instance` aliases with |
| 443 | your own certificates, you will first need to disable secure admin (if |
| 444 | enabled) and then change or delete the exiting `s1as` alias from both |
| 445 | the `keystore.jks` keystore and `cacerts.jks` truststore for the DAS. |
| 446 | You can use the `--changealias` or`--delete` option of `keytool` to |
| 447 | accomplish this. Then, import your own certificates. |
| 448 | |
| 449 | When you enable secure admin, the DAS and the instances then have copies |
| 450 | of the same keystore and truststore |
| 451 | |
| 452 | [[glgmy]][[GSSCG00232]][[an-alternate-approach-using-distinguished-names-to-specify-certificates]] |
| 453 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 454 | ==== An Alternate Approach: Using Distinguished Names to Specify Certificates |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 455 | |
| 456 | By default, the DAS uses the alias associated with the `--instancealias` |
| 457 | option to check incoming requests that use SSL/TLS cert authentication. |
| 458 | Conversely, instances use the alias associated with the `--adminalias` |
| 459 | option to check incoming requests with certificate authentication. |
| 460 | |
David Matějček | 2a4fd86 | 2021-12-22 09:49:49 +0100 | [diff] [blame] | 461 | The link:reference-manual/enable-secure-admin-principal.html#GSRFM00131[ |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 462 | `enable-secure-admin-principal`] subcommand |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 463 | provides an alternate approach. `enable-secure-admin-principal` |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 464 | instructs {productName} to accept admin requests when accompanied by |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 465 | an SSL certificate with the specified distinguished name (DN). |
| 466 | |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 467 | [NOTE] |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 468 | ==== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 469 | Any certificate you specify with `enable-secure-admin-principal` must |
| 470 | either be issued by a trusted certificate authority or, if it is |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 471 | self-signed, must already be in the {productName} truststore. |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 472 | ==== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 473 | |
| 474 | For example, assume that you write your own admin client that uses the |
| 475 | REST interface. When your client establishes the connection, it can |
| 476 | choose which certificate to use for its client cert. You would then |
| 477 | specify the DN of this certificate to `enable-secure-admin-principal`. |
| 478 | |
| 479 | You must specify either the DN or the `--alias` option of the |
| 480 | `enable-secure-admin-principal` subcommand. |
| 481 | |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 482 | If you specify the DN, {productName} records the value you specify as |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 483 | the DN. You specify the DN as a comma-separated list in quotes. For |
| 484 | example, |
| 485 | `"CN=system.amer.oracle.com,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US"`. |
| 486 | |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 487 | [NOTE] |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 488 | ==== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 489 | The `enable-secure-admin-principal` subcommand accepts the string you |
| 490 | enter and does not immediately validate it. However, secure admin must |
| 491 | be able to match the DN you specify in order to use it. |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 492 | ==== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 493 | |
| 494 | If you have sufficient privileges to view the content of the keystore, |
| 495 | you can use keytool to display the DN of a certificate: |
| 496 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 497 | [source] |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 498 | ---- |
| 499 | keytool.exe -v -list -keystore keystore.jks |
| 500 | Enter keystore password: |
| 501 | |
| 502 | Keystore type: JKS |
| 503 | Keystore provider: SUN |
| 504 | |
| 505 | Your keystore contains 2 entries |
| 506 | |
| 507 | Alias name: glassfish-instance |
| 508 | Creation date: Jul 7, 2011 |
| 509 | Entry type: PrivateKeyEntry |
| 510 | Certificate chain length: 1 |
| 511 | Certificate[1]: |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 512 | Owner: CN=systemname.amer.oracle.com-instance, OU=GlassFish, |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 513 | O=Oracle Corporation, L=Santa Clara, ST=California, C=US |
| 514 | Issuer: CN=systemname.amer.oracle.com-instance, OU=GlassFish, O=Oracle Corporation, |
| 515 | L=Santa Clara, ST=California, C=US |
| 516 | Serial number: 4e15d6e7 |
| 517 | Valid from: Thu Jul 07 11:55:19 EDT 2011 until: Sun Jul 04 11:55:19 EDT 2021 |
| 518 | Certificate fingerprints: |
| 519 | MD5: 05:6E:01:D6:CE:9D:29:DA:55:D9:10:5E:BE:CC:55:05 |
| 520 | SHA1: 2A:6D:A2:52:A5:2B:ED:DE:CD:B4:76:4A:65:9D:B5:79:A6:EA:3C:10 |
| 521 | Signature algorithm name: SHA1withRSA |
| 522 | Version: 3 |
| 523 | |
| 524 | Extensions: |
| 525 | |
| 526 | #1: ObjectId: 2.5.29.14 Criticality=false |
| 527 | SubjectKeyIdentifier [ |
| 528 | KeyIdentifier [ |
| 529 | 0000: 96 99 36 B6 CF 60 1E 8A AE 25 75 4E C8 34 AA AB ..6..`...%uN.4.. |
| 530 | 0010: E1 3B CF 03 .;.. |
| 531 | ] |
| 532 | ] |
| 533 | ---- |
| 534 | |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 535 | If you use the "`--alias` aliasname" form, then {productName} looks |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 536 | in its truststore for a certificate with the specified alias and uses |
| 537 | the DN associated with that certificate. alias-name must be an alias |
| 538 | associated with a certificate currently in the truststore. Therefore, |
| 539 | you may find it most useful for self-signed certificates for which you |
| 540 | know the alias. |
| 541 | |
| 542 | If you have sufficient privileges to view the contents of the |
| 543 | truststore, you can use keytool to display the alias of a certificate: |
| 544 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 545 | [source] |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 546 | ---- |
| 547 | keytool.exe -v -list -keystore cacerts.jks |
| 548 | Enter keystore password: |
| 549 | : |
| 550 | : |
| 551 | Alias name: glassfish-instance |
| 552 | Creation date: Jul 7, 2011 |
| 553 | Entry type: trustedCertEntry |
| 554 | |
| 555 | Owner: CN=systemname.amer.oracle.com-instance, OU=GlassFish, O=Oracle Corporation, |
| 556 | L=Santa Clara, ST=California, C=US |
| 557 | Issuer: CN=systemname.amer.oracle.com-instance, OU=GlassFish, O=Oracle Corporation, |
| 558 | L=Santa Clara, ST=California, C=US |
| 559 | Serial number: 4e15d6e7 |
| 560 | Valid from: Thu Jul 07 11:55:19 EDT 2011 until: Sun Jul 04 11:55:19 EDT 2021 |
| 561 | Certificate fingerprints: |
| 562 | MD5: 05:6E:01:D6:CE:9D:29:DA:55:D9:10:5E:BE:CC:55:05 |
| 563 | SHA1: 2A:6D:A2:52:A5:2B:ED:DE:CD:B4:76:4A:65:9D:B5:79:A6:EA:3C:10 |
| 564 | Signature algorithm name: SHA1withRSA |
| 565 | Version: 3 |
| 566 | |
| 567 | Extensions: |
| 568 | |
| 569 | #1: ObjectId: 2.5.29.14 Criticality=false |
| 570 | SubjectKeyIdentifier [ |
| 571 | KeyIdentifier [ |
| 572 | 0000: 96 99 36 B6 CF 60 1E 8A AE 25 75 4E C8 34 AA AB ..6..`...%uN.4.. |
| 573 | 0010: E1 3B CF 03 .;.. |
| 574 | ] |
| 575 | ] |
| 576 | ---- |
| 577 | |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 578 | When you run `enable-secure-admin`, {productName} automatically |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 579 | records the DNs for the admin alias and the instance alias, whether you |
| 580 | specify those values or use the defaults. You do not need to run |
| 581 | `enable-secure-admin-principal` yourself for those certificates. |
| 582 | |
| 583 | Other than these certificates, you must run |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 584 | `enable-secure-admin-principal` for any other DN that {productName} |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 585 | should authorize to send admin requests. This includes DNs corresponding |
| 586 | to trusted certificates (those with a certificate chain to a trusted |
| 587 | authority.) |
| 588 | |
| 589 | You can run `enable-secure-admin-principal` multiple times so that |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 590 | {productName} accepts admin requests from a client sending a |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 591 | certificate with any of the DNs you specify. |
| 592 | |
| 593 | The following example shows how to specify a DN for authorizing access |
| 594 | in secure administration: |
| 595 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 596 | [source] |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 597 | ---- |
| 598 | asadmin> enable-secure-admin-principal |
| 599 | "CN=system.amer.oracle.com,OU=GlassFish, |
| 600 | O=Oracle Corporation,L=Santa Clara,ST=California,C=US" |
| 601 | |
| 602 | Command enable-secure-admin-principal executed successfully. |
| 603 | ---- |
| 604 | |
David Matějček | 2a4fd86 | 2021-12-22 09:49:49 +0100 | [diff] [blame] | 605 | You can use the link:reference-manual/disable-secure-admin-principal.html#GSRFM00123[`disable-secure-admin-principal`] |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 606 | subcommand to disable a specific certificate for authenticating and |
| 607 | authorizing access in secure admin. You must specify either the DN or |
| 608 | the `--alias` option of the `disable-secure-admin-principal` subcommand. |
| 609 | To disable multiple certificates for authenticating and authorizing |
| 610 | access in secure admin, run the `disable-secure-admin-principal` |
| 611 | subcommand multiple times. |
| 612 | |
David Matějček | 2a4fd86 | 2021-12-22 09:49:49 +0100 | [diff] [blame] | 613 | You can use the link:reference-manual/list-secure-admin-principals.html#GSRFM00200[`list-secure-admin-principals`] |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 614 | subcommand to list the certificates for which {productName} accepts |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 615 | admin requests from clients. |
| 616 | |
| 617 | [[gkqjj]][[GSSCG00233]][[guarding-against-unwanted-connections]] |
| 618 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 619 | ==== Guarding Against Unwanted Connections |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 620 | |
| 621 | Secure admin guards against unwanted connections in several ways: |
| 622 | |
| 623 | * DAS-to-DAS, instance-to-instance: |
| 624 | |
| 625 | ** The DAS and the instances have copies of the same truststore, which |
| 626 | contains the public certificate of the DAS and the separate public |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 627 | certificate that is used by all instances. In addition, {productName} |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 628 | includes a unique, generated "domain ID" that servers use to ensure that |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 629 | admin requests from other {productName}s originate from the correct |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 630 | domain. |
| 631 | |
| 632 | ** DAS-to-other-DAS communication is not authenticated because each |
| 633 | different DAS will have its own self-signed certificate that is not in |
| 634 | the truststore of the other DAS. |
| 635 | |
| 636 | ** DAS-to-itself communication is unlikely unless you were to |
| 637 | misconfigure the admin listener port for an instance on the same host so |
| 638 | it is the same as for the DAS. Similarly, instance-to-instance traffic |
| 639 | is unlikely unless you were to misconfigure listener ports for instances |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 640 | on the same host. |
| 641 | + |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 642 | To prevent both of these situations, both cases are handled by making |
| 643 | sure that the connecting Principal (alias) is not the running Principal. |
| 644 | secure admin ensures that if the client has authenticated using SSL/TLS |
| 645 | client authentication that the Principal associated with the remote |
| 646 | client is not the same as the current process. That is, the DAS makes |
| 647 | sure that the Principal is not itself. Similarly, each instance ensures |
| 648 | that the client is not an instance. (The instances share the same |
| 649 | self-signed certificate and therefore are mapped to the same Principal.) |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 650 | * Remote client-to-instance: |
| 651 | + |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 652 | Remote `asadmin` clients are unable to connect directly to instances. If |
| 653 | the user on host "test1" runs a local command but specifies a remote |
| 654 | instance on host "test2," `asadmin` on test1 will read and send that |
| 655 | locally-provisioned password. The instance on "test2" will have a |
| 656 | different locally-provisioned password and so the authentication attempt |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 657 | will fail. |
| 658 | + |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 659 | Therefore, a user on "test1" will not be able to run a remote command |
| 660 | targeting an instance on "test2." |
| 661 | |
| 662 | [[gkofe]][[GSSCG00164]][[considerations-when-running-glassfish-server-with-default-security]] |
| 663 | |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 664 | === Considerations When Running {productName} With Default Security |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 665 | |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 666 | In {productName}, the default admin account is username "admin" with |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 667 | an empty password. Admin clients provide empty credentials or none at |
| 668 | all, and all are authenticated and authorized as that default admin |
| 669 | user. None of the participants (clients, DAS, or instances) encrypts |
| 670 | network messages. |
| 671 | |
| 672 | If this level of security is acceptable in your environment, no changes |
| 673 | are needed and you do not need to enable secure administration. Imposing |
| 674 | a heightened level of security is optional. |
| 675 | |
| 676 | However, consider link:#gkode[Table 5-2], which shows which operations |
| 677 | are accepted and rejected when secure admin is disabled. |
| 678 | |
| 679 | |
| 680 | [NOTE] |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 681 | ==== |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 682 | When secure admin is disabled, {productName} does allow remote |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 683 | monitoring (read-only) access via the REST interface. |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 684 | ==== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 685 | |
| 686 | |
| 687 | [[sthref37]][[gkode]] |
| 688 | |
| 689 | Table 5-2 Accepted and Rejected Operations if Secure Admin is Disabled |
| 690 | |
| 691 | [width="100%",cols="30%,25%,45%",options="header",] |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 692 | |=== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 693 | |Operation |Run From Same System as DAS |Run From Remote System |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 694 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 695 | |`start-local-instance` |
| 696 | |Functions as expected |
| 697 | |Cannot sync with DAS. |
| 698 | The instance starts but cannot communicate with the DAS. |
| 699 | DAS will not see the instance. |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 700 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 701 | |Any other `asadmin` subcommand |
| 702 | |Functions as expected |
| 703 | |Rejected. A user sees the username/password prompt, but even correct entries are rejected. |
| 704 | |
| 705 | |Commands that use SSH. For example, `create-instance`. |
| 706 | |Functions as expected; requires prior SSH configuration. |
| 707 | |Functions as expected; requires prior SSH configuration. |
| 708 | |=== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 709 | |
| 710 | |
| 711 | [[gkomz]][[GSSCG00165]][[running-secure-admin]] |
| 712 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 713 | === Running Secure Admin |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 714 | |
| 715 | This section describes how to run secure admin. The section begins with |
| 716 | prerequisites for running secure admin. |
| 717 | |
| 718 | [[gkokc]][[GSSCG00234]][[prerequisites-for-running-secure-admin]] |
| 719 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 720 | ==== Prerequisites for Running Secure Admin |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 721 | |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 722 | Before running {productName} with secure admin enabled, you must make |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 723 | sure that: |
| 724 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 725 | 1. The DAS is installed, initialized, and running. |
| 726 | 2. If one or more remote instances are installed and initialized, they |
| 727 | must not be running. |
| 728 | 3. Any administration clients you require are installed. |
| 729 | 4. The DAS communicates on the `-—adminport` you configure when you |
| 730 | create the domain, and defaults to 4848. An instance communicates on the |
| 731 | `ASADMIN_LISTENER_PORT` system property you specify for the instance. |
| 732 | 5. The user name and password sent by remote administration clients |
| 733 | (`asadmin`, administration console, browsers, and IDEs) must exist in |
| 734 | the realm and be in the admin group. |
| 735 | 6. The keystore and truststore for the domain exist. (They are created |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 736 | by default when you create the domain or install {productName}.) |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 737 | + |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 738 | If you are not using the default self-signed certificates, you must add |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 739 | your own valid certificates and CA root in the keystore and truststore, |
| 740 | respectively. |
| 741 | 7. If you are not using the default self-signed certificates, create |
| 742 | two aliases corresponding to certificates in the keystore and |
| 743 | truststore: one that the DAS will use for authenticating itself in |
| 744 | administration traffic, and one that the instances will use for |
| 745 | authenticating itself in administration traffic. |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 746 | |
| 747 | [[glgmh]][[GSSCG00235]][[an-alternate-approach-using-a-user-name-and-password-for-internal-authentication-and-authorization]] |
| 748 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 749 | ==== An Alternate Approach: Using A User Name and Password for Internal Authentication and Authorization |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 750 | |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 751 | By default, secure admin uses the {productName} self-signed |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 752 | certificates, via the aliases corresponding to these certificates, to |
| 753 | authenticate the DAS and instances with each other and to authorize |
| 754 | secure admin operations. Specifically, the DAS uses the (`s1as`) alias |
| 755 | for authenticating itself and authorizing access in administration |
| 756 | traffic, and instances use the (`glassfish-instance`) alias for |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 757 | authenticating themselves and authorizing access in secure admin traffic. |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 758 | |
| 759 | As described in link:#gkped[Using Your Own Certificates], you can |
| 760 | instead use your own certificates and their associated aliases for |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 761 | authenticating and authorizing the DAS and instances in administration traffic. |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 762 | |
| 763 | As an alternative to this certificate-based authentication and |
| 764 | authorization, you can instead use the |
David Matějček | 2a4fd86 | 2021-12-22 09:49:49 +0100 | [diff] [blame] | 765 | link:reference-manual/enable-secure-admin-internal-user.html#GSRFM00130[ |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 766 | `enable-secure-admin-internal-user`] subcommand to |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 767 | instruct all servers in the domain to authenticate to each other, and to |
| 768 | authorize admin operations submitted to each other, using an existing |
| 769 | admin user name and password rather than SSL certificates. |
| 770 | |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 771 | [NOTE] |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 772 | ==== |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 773 | If secure admin is enabled, all {productName} processes continue to |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 774 | use SSL encryption to secure the content of the admin messages, |
| 775 | regardless of how they authenticate to each other. |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 776 | ==== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 777 | |
| 778 | You might want to use the |
David Matějček | 2a4fd86 | 2021-12-22 09:49:49 +0100 | [diff] [blame] | 779 | link:reference-manual/enable-secure-admin-internal-user.html#GSRFM00130[ |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 780 | `enable-secure-admin-internal-user`] subcommand if your |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 781 | use case favors the use of a user name and password combination over the |
| 782 | use of SSL certificates and aliases. |
| 783 | |
| 784 | This generally means that you must: |
| 785 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 786 | 1. Create a valid admin user. |
| 787 | + |
| 788 | [source] |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 789 | ---- |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 790 | asadmin> create-file-user --authrealmname admin-realm --groups |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 791 | asadmin newAdminUsername |
| 792 | ---- |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 793 | 2. Create a password alias for the just-created password. |
| 794 | + |
| 795 | [source] |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 796 | ---- |
| 797 | asadmin> create-password-alias passwordAliasName |
| 798 | ---- |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 799 | 3. Use that user name and password for inter-process authentication and |
| 800 | admin authorization. |
| 801 | + |
| 802 | [source] |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 803 | ---- |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 804 | asadmin> enable-secure-admin-internal-user |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 805 | --passwordalias passwordAliasName |
| 806 | newAdminUsername |
| 807 | ---- |
| 808 | |
| 809 | The following example allows secure admin to use a user name and |
| 810 | password alias for authentication and authorization between the DAS and |
| 811 | instances, instead of certificates. |
| 812 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 813 | [source] |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 814 | ---- |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 815 | asadmin> enable-secure-admin-internal-user |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 816 | --passwordalias passwordAliasName |
| 817 | newAdminUsername |
| 818 | ---- |
| 819 | |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 820 | If {productName} finds at least one secure admin internal user, then |
| 821 | if secure admin is enabled {productName} processes will not use SSL |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 822 | authentication and authorization with each other and will instead use |
| 823 | user name password pairs. |
| 824 | |
| 825 | Most users who use this subcommand will need to set up only one secure |
| 826 | admin internal user. If you set up more than one secure admin internal |
| 827 | user, you should not make any assumptions about which user name and |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 828 | password pair {productName} will choose to use for any given admin |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 829 | request. |
| 830 | |
| 831 | As a general practice, you should not use the same user name and |
| 832 | password pair for internal admin communication and for admin user login. |
| 833 | That is, create at least one admin account specifically for internal |
| 834 | admin communication. |
| 835 | |
David Matějček | 2a4fd86 | 2021-12-22 09:49:49 +0100 | [diff] [blame] | 836 | You can use the link:reference-manual/disable-secure-admin-internal-user.html#GSRFM00122[`disable-secure-admin-internal-user`] |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 837 | subcommand to disable secure admin from using the user name (instead of |
| 838 | SSL certificates) to authenticate the DAS and instances with each other |
| 839 | and to authorize admin operations. To disable multiple user names for |
| 840 | authenticating and authorizing access in secure admin, run the |
| 841 | `disable-secure-admin-internal-user` subcommand multiple times. |
| 842 | |
David Matějček | 2a4fd86 | 2021-12-22 09:49:49 +0100 | [diff] [blame] | 843 | You can use the link:reference-manual/list-secure-admin-internal-users.html#GSRFM00199[`list-secure-admin-internal-users`] |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 844 | subcommand to list the user names for which {productName} |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 845 | authenticate the DAS and instances with each other and authorizes admin |
| 846 | operations. |
| 847 | |
| 848 | [[gkqby]][[GSSCG00236]][[example-of-running-enable-secure-admin]] |
| 849 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 850 | ==== Example of Running enable-secure-admin |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 851 | |
| 852 | The following example shows how to enable secure admin for a domain |
| 853 | using the default admin alias and the default instance alias. You must |
| 854 | restart the DAS immediately after enabling secure admin. |
| 855 | |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 856 | [NOTE] |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 857 | ==== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 858 | The only indicator that secure admin is enabled is the successful status |
| 859 | from the `enable-secure-admin` subcommand. When secure admin is running, |
| 860 | the DAS and instances do not report the secure admin status. |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 861 | ==== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 862 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 863 | [source] |
| 864 | ---- |
| 865 | asadmin> enable-secure-admin |
| 866 | Command enable-secure-admin executed successfully. |
| 867 | ---- |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 868 | |
| 869 | The following example shows how to enable secure admin for a domain |
| 870 | using an admin alias adtest and an instance alias intest. You can also |
| 871 | use this command to modify an existing secure admin configuration to use |
| 872 | different aliases. |
| 873 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 874 | [source] |
| 875 | ---- |
| 876 | asadmin> enable-secure-admin --adminalias adtest --instancealias intest |
| 877 | ---- |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 878 | |
| 879 | The following example shows how to disable secure admin: |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 880 | [source] |
| 881 | ---- |
| 882 | asadmin> disable-secure-admin |
| 883 | Command disable-secure-admin executed successfully. |
| 884 | ---- |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 885 | |
| 886 | You can use the following command to see the current state of secure |
| 887 | admin in a domain: |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 888 | [source] |
| 889 | ---- |
| 890 | asadmin> get secure-admin.enabled |
| 891 | secure-admin.enabled=false |
| 892 | Command get executed successfully. |
| 893 | ---- |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 894 | |
| 895 | [[gkolu]][[GSSCG00166]][[additional-considerations-when-creating-local-instances]] |
| 896 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 897 | === Additional Considerations When Creating Local Instances |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 898 | |
| 899 | If you use `xxx-local-instance` commands to set up local instances, |
| 900 | either leave secure admin disabled, or enable it before you create or |
| 901 | start the instances and leave it that way. |
| 902 | |
| 903 | However, if you use `xxx-instance` commands over SSH to manage remote |
| 904 | instances, you can enable and disable secure admin, although this is not |
| 905 | recommended because it can result in an inconsistent security model. |
| 906 | |
| 907 | [[gkqah]][[GSSCG00167]][[secure-admin-use-case]] |
| 908 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 909 | === Secure Admin Use Case |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 910 | |
| 911 | This section describes a simple secure admin use case. |
| 912 | |
| 913 | In the |
| 914 | `asadmin --secure=false --user me --passwordfile myFile.txt cmd ...` use |
| 915 | case, the user submits a command with `--secure` set to false, and |
| 916 | supplies password credentials. |
| 917 | |
| 918 | The important concept to note is that `asadmin` uses HTTPS because of |
| 919 | the DAS redirection, even though the command sets `--secure` to false. |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 920 | `asadmin` sends the HTTP Authorization header along with the redirected request. |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 921 | |
| 922 | In addition to the flow described here, certificate authentication is |
| 923 | also performed as described in link:#gkqax[Table 5-3]. Also, the |
| 924 | credentials that the user supplies are assumed to be valid administrator |
| 925 | credentials for the DAS. |
| 926 | |
| 927 | [[sthref38]][[gkqax]] |
| 928 | |
| 929 | Table 5-3 asadmin --secure=false, With Username and Password |
| 930 | |
| 931 | [width="100%",cols="34%,33%,33%",options="header",] |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 932 | |=== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 933 | |asadmin |Grizzly |AdminAdapter |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 934 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 935 | |Sends HTTP request, no authorization header (because the transport is not secure). |
| 936 | | |
| 937 | | |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 938 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 939 | | |
| 940 | |Returns 3xx status and redirects HTTP to HTTPS. |
| 941 | | |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 942 | |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 943 | |Follows redirection, this time adding the Authorization header (because transport is now HTTPS). |
| 944 | | |
| 945 | | |
| 946 | |
| 947 | | |
| 948 | | |
| 949 | |Authenticates admin user and password from HTTP Authorization |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 950 | header in the realm Executes command, and responds with success status. |
David Matějček | 7a39e79 | 2021-12-19 14:08:00 +0100 | [diff] [blame] | 951 | |=== |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 952 | |
| 953 | |
| 954 | [[gkodn]][[GSSCG00168]][[upgrading-an-ssl-enabled-secure-glassfish-installation-to-secure-admin]] |
| 955 | |
David Matějček | dbccabf | 2021-12-20 14:06:31 +0100 | [diff] [blame] | 956 | === Upgrading an SSL-Enabled Secure GlassFish Installation to Secure Admin |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 957 | |
David Matějček | 6c58c14 | 2021-12-20 20:22:31 +0100 | [diff] [blame] | 958 | If you enable secure admin on an SSL-enabled {productName} |
Vinay Vishal | 7c4c4fc | 2019-01-28 12:01:04 +0530 | [diff] [blame] | 959 | installation, secure admin uses the existing <ssl cert-nickname> value |
| 960 | as the DAS adminalias for secure admin. |
| 961 | |
| 962 | |