Skip to main content

STS Tokens

The SmarterServices Security Token Service (STS) mints short-lived, opaque, revocable credentials without exposing your long-lived API credential to a browser. Both token types use the same backend endpoints:
Call these endpoints from your backend with your API credential. The caller needs sp:CreateStsToken to issue a token and sp:RefreshStsToken to refresh one. Never call the STS endpoints directly from browser code.

Shared security guardrails

Both token types share these protections:

SmarterElements tokens

Use an element token when embedding a SmarterElements component. The server expands the requested elementType into a fixed, deployment-scoped policy.

Issue an element token

The response includes:
elementToken is an RS256/JWKS-signed embed assertion. Pass it to the SmarterElements SDK as elementToken; pass the opaque stsToken as the runtime element credential when the embed makes API calls.For the complete SDK setup, element integration, and browser-side refresh callback, see SmarterElements Authentication.

Silent refresh

Both token types refresh through the same endpoint:
Refresh reuses the token family’s frozen policy, revokes the previous credential after minting its replacement, and cannot pass the root token’s 8-hour absolute lifetime. An element refresh returns a new elementToken and opaque stsToken; an API refresh returns a new opaque bearer stsToken without elementToken or elementType.

Network conditions

Only IpAddress and NotIpAddress operators are allowed in networkConditions. Any other operator returns 400 CONDITION_OPERATOR_NOT_ALLOWED. The semantics depend on the token type:
  • Element tokens: supplied network conditions replace the creator’s network conditions. If omitted, the creator’s network conditions are inherited. If neither side supplies them, no network condition is applied.
  • API tokens: supplied network conditions are merged as an additional restriction onto every Allow statement. They never replace or loosen the caller’s existing conditions.
Network conditions restrict where a credential can be used; they do not grant additional resource access.

For end users

Your application may use a temporary access pass instead of sharing its full account credential with a browser or embedded service. The pass only works for the limited actions it was created for, expires automatically, and can be stopped immediately. Embedded experiences use an element pass, while other short-lived API access uses an API pass; either way, your full account credentials stay protected.