Last updated

Use a secured endpoint

Secure VENUS endpoints prevent unauthorized users from operating an application.

By default, VENUS authenticates with Windows AD but can be configured to use external identity providers such as Okta, Microsoft Entra, and Auth0.

Go to Authentication and authorization for more information on VENUS authentication and authorization.

Get current authentication mode

By default, VENUS has authentication and authorization disabled.

Use the provided authentication mode endpoint to see your VENUS environment's authentication mode.

If the authentication mode is set to None, go to Enable authentication to enable authentication.

get/api/vector/v3/system/authentication-mode
curl 'https://{{your_venus_webapi_ip_address}}/api/vector/v3/system/authentication-mode' \
  --header 'Authorization: Bearer <token>'
Response
Success

Get an access token

To obtain an access token, a call must be made to the token endpoint in the identity provider. Default values are provided for the grant_type and scope. These default values can be used to execute the endpoint along with valid credentials to an account tied to VENUS operating system security groups.

post/api/vector/v1/authorization/token
curl 'https://{{your_hamilton_identity_provider_ip_address}}/api/vector/v1/authorization/token' \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --data '{
  "grant_type": "password",
  "username": "",
  "password": "",
  "client_id": "Venus",
  "client_secret": "venus_secret",
  "scope": "openid"
}'
Response
Token generated successfully

Call a secured endpoint

The previously obtained access token must be used as a bearer token in the authorization header for the endpoint. In the provided code snippet, replace <YOUR_JWT_HERE> with the JWT. If an incorrect access token is provided, the endpoint responds with an unauthorized error message. If the correct access token is provided, the endpoint returns the expected response for the associated endpoint.

get/api/vector/v3/system/venus/version
curl 'https://{{your_venus_webapi_ip_address}}/api/vector/v3/system/venus/version' \
  --header 'Authorization: Bearer <token>'
Response
Returns VENUS version information.