Aller au contenu

Applications and templates

An application is anything that asks OkYouIn whether a user may sign in: a VPN concentrator, a switch, a Linux server, a web application, your own backend, or a fleet of Windows servers. Every sign-in OkYouIn answers is matched to exactly one application, and the application decides three things the global policy does not:

  • How the request arrives — RADIUS, OpenID Connect, SAML 2.0, the Verify API or the Windows logon agent.
  • Which second factors can work — a device that cannot show a prompt can only use push-style approval; a device that checks the password itself can use “MFA only”.
  • What is sent back on success — RADIUS reply attributes, OIDC claims, SAML attributes or API answer attributes, chosen by the application’s own rules.

Applications live under Access ▸ Applications.

request ──► matched to an application
│
▼
global policy (application · who · source · country · time · validity)
│ first matching rule: Allow or Deny — default Deny
▼
application rules (same conditions)
│ first matching rule: MFA on or off, attributes to send
▼
first factor → second factor → answer to the application

The global policy decides whether a user gets in at all; the application’s rules decide how an allowed request is served. A new application is covered by no policy rule, so nothing gets in until you add one — the console reminds you right after creation (“Add a rule in Policies to let users in”). See Policy for the rule funnel and the policy tester, which shows the full trace for any application type.

The integration type (the template’s base type) is fixed when the application is created.

TypeUsed forPage
RADIUSVPNs, network devices, Linux PAM, Windows NPS / RD GatewayRADIUS
OIDCWeb applications with “Sign in with OpenID Connect”OpenID Connect
SAML 2.0Web applications that expect a SAML identity providerSAML 2.0
API / SDKYour own application’s backend asks OkYouIn for MFAVerify API
Windows logonThe OkYouIn agent on the Windows logon screenWindows logon agent

Related pages: RD Gateway (agentless RDP MFA over RADIUS) and Kerberos desktop SSO (the Windows ticket in place of the password on the single sign-on page).

Every application is created from a template. A template is a small YAML document that describes one product — a FortiGate, a GitLab instance, a Linux server — and carries:

PartWhat it does
CapabilitiesWhich methods work through this integration: push, TOTP code, e-mail code, Telegram, MFA-only mode, password check, challenge prompts, accounting. These are protocol limits, not policy.
Client IP sourceWhere the end user’s address comes from (RADIUS Calling-Station-Id, the browser, the agent, or your server). Without one, network and country conditions cannot match.
DefaultsThe wizard’s starting values (first factor, prompt mode, interim interval, redirect URIs…).
Attribute catalogThe reply attributes, claims or SAML attributes that application rules offer, with defaults and validation.
Connect instructionsSteps and configuration snippets, with placeholders filled from the application’s settings.
Tested onThe product versions verified in our lab, and in which modes.

OkYouIn ships 27 built-in templates; 14 of them are verified in our lab. The device guides cover each tested template step by step, and list the rest honestly as not verified yet. In the console, a template without lab results says “Not verified in lab yet — instructions are based on vendor documentation.”

Templates are browsed and managed under Access ▸ Templates. Each one opens with an Overview (capabilities, client IP source, whether challenge prompts are supported) and How to connect (the instructions before an application exists, with highlighted placeholders that are filled in once you create one).

When your product is not in the catalog, use a template from the Universal category:

  • Generic RADIUS — any RADIUS client. Enable challenge prompts only if the client shows them.
  • Generic OIDC — any OpenID Connect relying party.
  • Generic SAML — any SAML 2.0 service provider.
  • Custom app (API / SDK) — your own backend, through the Verify API.

You can add your own templates — for a vendor the catalog lacks, or a built-in one adapted to your conventions (your group names, your reply attributes, your internal steps).

  1. Open Access ▸ Templates ▸ Import template and click Download sample YAML. The sample is a commented RADIUS template with an attribute catalog.

  2. Edit it. The essentials:

    apiVersion: okyouin/v1 # fixed
    kind: ApplicationTemplate # fixed
    id: fortigate-vpn-groups # lowercase letters, digits, dashes; built-in ids are reserved
    version: 1.0.0 # semantic version
    name: FortiGate VPN with groups
    vendor: Fortinet
    category: vpn_network # vpn_network | servers_desktops | web_saas | universal
    base_type: radius # radius | saml | oidc | api
    description: FortiClient VPN via RADIUS; OkYouIn returns the FortiGate user group.
    capabilities:
    push: true
    totp: true
    sms_email_otp: true # needs challenge: true
    telegram: true
    mfa_only_mode: true
    password_check: true
    challenge: true # radius only
    accounting: false # radius only
    client_ip_source: calling_station_id
    defaults:
    firstFactor: password
    attributes:
    - name: Fortinet-Group-Name
    type: string
    description: FortiGate user group matched by the firewall policies.
    recommended: true
    default: OkYouIn-VPN
    instructions:
    steps:
    - Run the CLI below.
    snippets:
    - title: FortiOS CLI
    lang: fortios
    body: |
    config user radius
    edit "OkYouIn"
    set server "{{host}}"
    set secret {{sharedSecret}}
    next
    end
  3. Drop the file on the import dialog or paste it. The console validates it as you type and then on the server, and shows a Catalog preview of how it will look.

  4. Click Import. The template appears in the catalog with the origin Custom.

Rules worth knowing before you write one:

  • Unknown keys are rejected, YAML anchors and aliases are not allowed, and a template is at most 256 KB.
  • Placeholders such as {{host}}, {{sharedSecret}} or {{radiusPort}} must be connection fields of the base type or server values; an undeclared placeholder is refused.
  • A step or snippet can carry when: {field, equals} to show only for one setting — for example one client profile per first-factor mode.
  • Secrets, the NAS-Identifier and sources are generated or chosen per application, so they cannot be preset in defaults.
  • An OIDC or SAML template cannot offer MFA only: their first factor is always the password OkYouIn checks.
  • Importing a higher version of an existing custom template adds it as the latest version.
  • A tested: block lists the environments you verified; without it the console shows the “Not verified in lab yet” note.
  1. Access ▸ Applications ▸ Add application. Pick the product; search by product, vendor or protocol. Not listed? Use a Universal template.

  2. The wizard shows the template’s fields with its defaults: a name, and for RADIUS the sources and NAS-Identifier, for OIDC the redirect URIs, for SAML the service provider’s entity ID and ACS URL, and so on. Secrets (shared secret, client secret, API key, enrollment token) are generated for you.

  3. Create application. The application opens on its detail page.

  4. Add a rule in Policies that allows the users you want for this application.

TabWhat is there
SettingsThe connection, authentication, MFA and protocol settings. One Save settings applies them. Secrets are stored encrypted; revealing or copying one is recorded in the audit log.
RulesApplication rules: MFA on or off per condition, and the attributes sent back. The Default rule applies when no rule above matches and always stays last.
ConnectThe template’s instructions with your real values filled in — host, ports, NAS-Identifier, client ID, SAML URLs, enrollment token — ready to copy.
SessionsRADIUS accounting sessions (applications whose template supports accounting).
HostsRegistered Windows servers (Windows logon applications).

The Connect tab says which secrets are masked and which are filled into the snippets, and links to Settings to manage them. If the server’s public URL is missing or is not https://, the Connect tab of OIDC, SAML, API and Windows logon applications warns you first — those integrations need it (set it in Settings ▸ General).

Application rules use the same conditions as the global policy — user groups, network objects, countries, time ranges, validity — but have no Allow / Deny: the global policy has already decided access. Each rule sets:

  • Require MFA — on: matching users complete MFA; off: they are accepted after the first factor.
  • Attributes — what goes back to the application, from the template’s catalog (Add from the template) or a custom name:
IntegrationAttributes become
RADIUSReply attributes in the Access-Accept, in order; the same attribute may repeat
OIDCClaims in every id_token and the userinfo answer, whatever scopes the client asks for
SAMLAttributes in the assertion; a rule attribute replaces a mapping row of the same name
APIThe attributes object of an allow answer

Template attributes a rule leaves out are still sent with their default. Example: a rule for the group DevOps sends the claim role=Admin to Grafana, while the Default rule sends nothing and Grafana falls back to its own group mapping.

Rule attribute values come from the rule; SAML attributes and API answers can also carry fixed user fields (e-mail, display name, groups…). Arbitrary directory attributes and value transformations are not available.

Every decision lands in the unified Logging ▸ Access log, and in the protocol’s own journal: RADIUS log, SSO sign-in log (OIDC, SAML and Verify API), Windows sign-in log. Each entry names the application and the reason for the decision; the policy tester replays any sign-in with the full rule trace.