Skip to content

Console sessions in Apinx Cloud

ConceptExplains how it works and why.

In Apinx Cloud a console session stays in the browser and on the network that signed in. A copy of it, for example a cookie read out of a support file, a synced browser profile or a shared computer, is of little use anywhere else. A few risky actions also ask for a code sent to your email first, even when you are signed in.

On premises, sessions work as described in Authentication at a glance. Nothing on this page applies there.

Where a session works

When you sign in, Apinx records your browser (for example Chrome on Windows) and your address. On every request after that:

The request comes from What happens
The same browser, on the same network (the same IPv4 /24 or IPv6 /64) It goes through.
The same browser, on a new network Apinx emails you a 6-digit code and the console asks for it. Once you enter it, that address is added to the session (up to five) and you carry on. Until then the session does nothing from there.
Another browser The session ends at once. Apinx emails you and records it in the organization's Audit log. Sign in again.

Moving between Wi-Fi and mobile data, or a laptop switching between IPv4 and IPv6, asks for a code once per network. A cookie never moves to another browser on its own, so a session seen in another browser was copied.

The session token works the same way in an Authorization: Bearer header. A script that signs in and calls from the same machine stays bound to itself.

The exact address

An organization's administrators can tie sessions to the exact address instead of the network, under Admin › Users › Console sessions. Every new address then asks for a code. This suits offices and VPNs with fixed addresses. It is part of the Enterprise plan.

Risky actions ask for the code again

Some actions can lock people out, leave with a credential that keeps working, or send data out of Apinx. They need a code emailed to you, unless you entered one in the last ten minutes:

  • People: inviting someone, changing a member's role, removing a member.
  • Deleting the organization or an environment.
  • Credentials: issuing or rotating an application key or client secret, changing the addresses an application, key or secret works from, creating a test access token, rotating the token signing key.
  • Data leaving Apinx: turning on request-body tracing, changing where traces are exported (OpenTelemetry), exporting the whole configuration.
  • The organization's Console sessions setting itself.

Signing in with an emailed code counts as confirmed for the next ten minutes. Signing in on a remembered browser does not.

An API client sends the code in the X-Apinx-Confirm-Code header of the same request, after the first answer:

Code Status Meaning
APX-SAAS-0072 428 Confirm with the emailed code. details.confirm is network (with confirm_address) or action (with confirm_action). details.sent_to says where the code went.
APX-SAAS-0073 403 The code is wrong, used or expired. Send the request without a code to get a new one.
APX-SAAS-0074 429 Five wrong codes in ten minutes. Wait, then ask for a new one.
APX-SAAS-0075 403 The exact address is not part of the organization's plan.
APX-SAAS-0076 401 The session was used from another browser and has ended.

A code works once, for ten minutes, for the session it was sent for. At most one code goes out a minute, and a session on new networks gets at most three an hour.

Your sessions

Preferences › Your sessions lists every session you have, in every organization, with:

  • the browser and system;
  • the address it was last used from and the address it signed in from;
  • the organization;
  • when it signed in and when it was last used.

Sign out ends one. Sign out all other sessions ends every one but the browser you are using.

If a code arrives that you did not ask for, someone may have a copy of your session:

  1. Cancel the dialog if one is open.
  2. Choose Sign out all other sessions.
  3. Change your password, which also forgets your remembered browsers.

Switching organization

Switching to another of your organizations keeps the session's browser, its confirmed addresses and its sign-in time. The session still ends eight hours after you signed in (twelve on premises, where the limit is set in console.session_ttl), however often you switch.

What this does not stop

Binding a session to where it signed in stops a copied session from being used somewhere else. It cannot stop:

  • malware that keeps running on your own computer and acts through your own browser;
  • someone on the same network who uses the same browser family.

Keep your computer clean, lock it when you leave it, and sign out on shared computers.

For operators

Apinx Cloud operators control this with two settings under Settings › Sign-in and links:

  • login.session_binding: network (the default), address (every organization) or off.
  • login.confirm_minutes: how long one code covers risky actions, 10 by default; 0 asks only at sign-in.

Codes need the emailed sign-in codes on (login.email_code). With them off, a new network is recorded without a code, risky actions go through, and another browser still ends the session.

Operator sessions are tied the same way and end on any change of browser or network.

The binding depends on the real client address. It reaches Apinx through the trusted proxies in ops.trusted_proxies, which by default is nginx on the same host, with Cloudflare's address restored by nginx. If a new proxy hides the address, every request looks new: set login.session_binding to off until the proxy is listed.