While Address Manager Failover
Monitoring is enabled, Gateway enables an Address Manager server alias named primary-address-manager.
This alias represents the current primary Address Manager server, whether
it's the original primary or a replacement from standby after a failover event. When
users log in and authenticate via primary-address-manager (through the
UI or the API), Gateway will automatically log users back in to the
new primary Address Manager server when a failover event occurs.
Authenticating with the Address Manager cluster from the Gateway UI
When logging in through the Gateway UI:
To authenticate with the Address Manager failover replication cluster: From the Gateway login page, in BAM Selection, choose
primary-address-manager.This logs you in with whatever Address Manager server is the current primary server in the replication cluster, which can change when a failover event occurs. Doing so also makes sure you are automatically logged back in to Address Manager should a failover occur while you are logged in. When selecting
primary-address-manageras your server, you must use the same authentication information details (username and password) that were specified while configuring Failover Monitoring.To authenticate with a specific Address Manager server in the cluster: Select the specific Address Manager server from the list.
While logged in to a specific server, Gateway will not automatically log you back in when a failover event occurs.
Important: In almost all cases, users should chooseprimary-address-managerinstead. Logging in usingprimary-address-managermakes sure that the user session makes use of the Gateway failover monitoring system and continues using whatever Address Manager server is configured as the Primary after failover. This lets any currently-running workflows that rely on Address Manager to continue functioning.
Authenticating with the Address Manager Cluster through the Gateway REST API
While Failover Monitoring is active, when authenticating with Gateway through the rest_login endpoint, set
bam_alias to "primary-address-manager". This
alias will be available only after Failover Monitoring has been started in Gateway. Logging in using the
primary-address-manager alias makes sure that the user session
makes use of the Gateway monitoring system and continues using
whatever Address Manager server is configured as the Primary after
failover.
The JSON response to a Gateway authentication request made
through the rest_login API endpoint above will contain the
authentication token. This token is comprised of the keyword
BAMAuthToken and a dynamically generated token hash (such as
"BAMAuthToken: 4bippMTQ10DAzNzgwNfE0MzphcGk="). Use this token
when communicating with the Address Manager API through the Gateway REST API. This token will still be valid even if an Address Manager failover event occurs.
rest_login API request, The REST API
authentication call must use the same authentication information details (username
and password) that were specified during Failover Monitoring
setup. primary-address-manager, the user sessions will not use
the Address Manager failover system. When an Address Manager failover occurs, any workflows running in those sessions that rely on Address Manager will not switch to the new primary Address Manager server.For example, the following API request retrieves a token string that will automatically switch to a new Address Manager server if the current primary server fails:
Request:
POST http://<Gateway_url>/rest_login Content-Type: application/JSONRequest body:
{ "username": "<Gateway username>", "password": "<Gateway password>", "bam_alias": "primary-address-manager" }