Skip to main content

Apps

Imagine you have an internal service — an admin panel, staging, Grafana, an internal API — and you want to grant access only to specific people, from specific countries, with corporate SSO verification. Apps in Tuna solve exactly this problem.

Apps are a secure reverse proxy that checks every incoming request: who the user is, how they authenticated, where they came from, and whether they are allowed to access the requested path.

apps-main

What you can do:

  • protect any web service with authorization in minutes, without changing the service's code;
  • set up granular access control — for example, /admin/* only for admins from Russia, while /api/health is open without authentication;
  • connect corporate SSO (Google, Yandex, GitHub, GitLab, VK, any OIDC-compatible provider);
  • require MFA or manual admin approval for sensitive operations;
  • publish a service without a public IP via a tunnel — just run a single command;
  • grant machine access through service tokens for CI/CD, monitoring, and automation.

Operating modes​

When creating an app, you need to choose how Tuna will deliver traffic to your service.

Proxy​

The Tuna node connects to the upstream directly by URL. This mode is suitable when the service is already network-accessible — running in Kubernetes, in a cloud VM, or simply on the same network as the node.

Creating an app in proxy mode

You can specify multiple upstream addresses — traffic will be distributed by weight. For example, with weights 3 and 1, the first upstream will receive 75% of requests, and the second — 25%.

Tunnel​

The backend connects to Tuna on its own via the client agent. An ideal option when the service has no public IP — behind NAT, on a dev machine, or in a corporate network.

Creating an app in tunnel mode

After creating an app in tunnel mode, the details page will show a ready-to-use command:

Command to start the tunnel
tuna app <name> --url=http://127.0.0.1:8080

Run it on the machine with the service — the client will establish an outbound connection to the node, and the app will become accessible through the secure domain.

tip

For a quick test without a real backend, add the --hello-world flag — Tuna will start a built-in test server.

Creating an app​

tip

This section is available to the Founder, Owners and Administrators.

Go to the Apps section and click + Add app.

FieldDescription
NameUnique name within the team, used in CLI
ModeProxy or Tunnel
UpstreamsBackend addresses — only for Proxy mode
DomainThe domain through which the app will be accessible to users

Main parameters​

After creation, the app details page opens with the main settings.

App main parameters
  • Session duration — how long a session lasts after login. Once expired, the user must log in again. Default is 24 hours.
  • Inactivity timeout — the session expires if the user has not made any requests for the specified time. Disabled by default.

Providers​

This is where you choose the login methods for the app. You can combine multiple options — the user will see all of them on the login page.

Authorization providers
  • Email OTP — the user enters an email and receives a one-time code. Convenient for external contractors and one-off access.
  • tuna.am accounts — login via a personal tuna.am account.
  • Team providers — external Identity Providers (Google, Yandex, GitHub, GitLab, VK, any OIDC) configured on the Providers page. Uncheck "All team providers" to select specific ones.
Team providers list

Overview​

The Overview block on the details page visualizes the current configuration: on the left — who can log in, in the center — which policies the request passes through, on the right — where traffic is routed.

App overview

This is a convenient way to verify at a glance that everything is configured as intended.

Login page​

When a user opens a protected app without an active session, they are taken to the login page. The set of buttons is generated automatically from the connected providers.

Login page

If the team has external providers configured, each one is shown as a separate "Sign in with ..." button:

Login page with providers
info

The login page appearance can be customized — add a logo through the app settings.

App catalog​

Team members can see all apps available to them as cards on the Apps page. Clicking a card opens the app in a new tab.

The sidebar also gives the user access to Access requests and Sessions — for managing their own requests and active sessions.

Audit​

All actions with apps are recorded in the audit log: creating and modifying apps, user logins, approvals and rejections of access requests, session revocations. Each event contains details — who, when, from where, and what exactly happened.

App audit log