Log in to the gateway server.
The iagctl login command authenticates a user with the gateway server from a client. After you log in, the gateway writes your API key to the api.key file in your gateway working directory. The gateway client automatically reads this file for subsequent API calls.
For more information, see Manage users and credentials.
The first time the server starts, it displays a temporary password for the admin user in the logs. When you log in with the admin user for the first time, the gateway requires you to change the password.
After authentication, the gateway server returns an API key with a default expiration time of 24 hours. You can change the expiration timeout on the server using the GATEWAY_SERVER_API_KEY_EXPIRATION configuration variable.
Use the --change-password flag to change your password. When you change a password, the gateway removes all previously created API keys for that user.
If you lose the admin account credentials, run iagctl server --recover-admin-user on the server to start the reset process.
Use the --raw flag to print the full API key to the terminal. This can be useful when using gateway commands in external applications: