public class Endpoints extends Object implements Serializable
Endpoints instance provides endpoint URIs for the various Conjur services.
Preferred construction is via fromSystemProperties() or
fromCredentials(Credentials). These paths derive service URIs from an
appliance URL and account name:
{applianceUrl}/authn/{account}{applianceUrl}/secrets/{account}/variable{applianceUrl}/secrets{applianceUrl}/resources/{account}For non-standard authenticators (LDAP, OIDC, etc.), supply a custom authn URL.
| Constructor and Description |
|---|
Endpoints(String authnUri,
String secretsUri)
Deprecated.
Use factory methods for new code:
fromSystemProperties() or fromCredentials(Credentials). |
Endpoints(URI authnUri,
URI secretsUri)
Deprecated.
Use factory methods for new code:
fromSystemProperties() or fromCredentials(Credentials). |
| Modifier and Type | Method and Description |
|---|---|
static Endpoints |
fromCredentials(Credentials credentials)
Creates endpoints using the account/appliance values from configuration and
the authenticator URL from the provided credentials.
|
static Endpoints |
fromSystemProperties()
Creates endpoints from system properties / environment variables.
|
String |
getAccount()
Returns the Conjur account name associated with these endpoints.
|
URI |
getAuthnUri() |
URI |
getBatchSecretsUri()
Returns the base URI for batch secret retrieval:
{applianceUrl}/secrets |
URI |
getResourcesUri()
Returns the URI for listing resources:
{applianceUrl}/resources/{account} |
URI |
getSecretsUri() |
String |
toString() |
@Deprecated public Endpoints(URI authnUri, URI secretsUri)
fromSystemProperties() or fromCredentials(Credentials).This legacy constructor preserves only the explicitly supplied authn and secrets URIs. It does not initialize derived state needed by newer APIs, such as batch secret retrieval. Use the factory methods for fully initialized endpoint instances.
authnUri - the authn service URIsecretsUri - the secrets service URI@Deprecated public Endpoints(String authnUri, String secretsUri)
fromSystemProperties() or fromCredentials(Credentials).This legacy constructor preserves only the explicitly supplied authn and secrets URIs. It does not initialize derived state needed by newer APIs, such as batch secret retrieval. Use the factory methods for fully initialized endpoint instances.
authnUri - the authn service URI stringsecretsUri - the secrets service URI stringpublic URI getAuthnUri()
public URI getSecretsUri()
public String getAccount()
IllegalStateException - when account is unavailable on this instancepublic URI getBatchSecretsUri()
{applianceUrl}/secretsIllegalStateException - when appliance URL is unavailable on this instancepublic URI getResourcesUri()
{applianceUrl}/resources/{account}public static Endpoints fromSystemProperties()
Reads the following configuration values:
CONJUR_ACCOUNT (required)CONJUR_APPLIANCE_URL (required)CONJUR_AUTHN_URL (optional, defaults to {applianceUrl}/authn)Endpoints instance derived from configured Conjur settingsIllegalArgumentException - if required configuration is missingpublic static Endpoints fromCredentials(Credentials credentials)
Reads the following configuration values:
CONJUR_ACCOUNT (required)CONJUR_APPLIANCE_URL (required)credentials - credentials whose authnUrl is used to build the authn endpointEndpoints instance combining configured account/appliance with the provided authn URLIllegalArgumentException - if required configuration is missingCopyright © 2026. All rights reserved.