Creating an OIDC application in Yandex Identity Hub for integration with Warpgate
Warpgate
To enable your organization’s users to authenticate in Warpgate via OIDC, create an OIDC application and set up Warpgate integration. In this tutorial, you will also configure user group provisioning to Warpgate and map the groups to access roles.
OIDC apps can be managed by users with the organization-manager.oauthApplications.admin role or higher.
To provide your organization’s users with access to Warpgate:
- Create an OIDC app.
- Create a user group and add users to it.
- Set up the integration.
- Make sure the application works correctly.
If you no longer need the resources you created, delete them.
Creating an OIDC app
- Log in to Yandex Identity Hub
. - In the left-hand panel, select
Apps. - Click
Create application and in the window that opens:- Select the OIDC (OpenID Connect) single sign-on (SSO) method.
-
In the Application type field, select Web Application.
OIDC apps of the
Web Applicationtype are optimized for user authentication to external web apps with a server end (backend), where the application secret can be safely stored. For more information about OIDC application types, see Types of OIDC apps in Yandex Identity Hub. - In the Name field, specify
warpgate-oidc-app. - In the Folder field, select the folder where you want to create an OAuth client for your app.
- Optionally, enter a description in the Description** field, e.g.,
OIDC app for integration with Warpgate. - Click Create application.
- In the new app, click
Edit at the top right. - In the Scopes field, select the
groups (user's groups in the organization)attribute and set it toAssigned groups only. In new OIDC apps, this attribute is off by default. - Click Save.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id.
If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
-
Create an OAuth client:
yc iam oauth-client create \ --name warpgate-oauth-client \ --scopes openid,email,profile,groups \ --profile-id webWhere:
--name: OAuth client name.--scopes: User attributes available to Warpgate. The specified attributes are:openid: User ID. Required attribute.email: User email address.profile: Additional user details, such as first name, last name, and avatar.groups: User groups in the organization. You will need groups for mapping to Warpgate access roles.
-
--profile-id: OAuth client (OIDC application) type. This tutorial creates an OAuth client of theWeb Applicationtype.
Result:
id: ajeqqip130i1******** name: warpgate-oauth-client folder_id: b1g500m2195v******** authentication_methods: - client_secret_basic - client_secret_post status: ACTIVE profile_id: web pkce_required: trueSave the
idfield value: you will need to create and configure your app. -
Create a secret for your OAuth client:
yc iam oauth-client-secret create \ --oauth-client-id <OAuth_client_ID>Result:
oauth_client_secret: id: ajeq9jfrmc5t******** oauth_client_id: ajeqqip130i1******** masked_secret: yccs__939233b8ac**** created_at: "2026-09-12T10:14:17.861652377Z" secret_value: yccs__939233b8ac********Save the
secret_valuefield value: you will need it to configure Warpgate. -
Create an OIDC app:
yc organization-manager idp application oauth application create \ --organization-id <organization_ID> \ --name warpgate-oidc-app \ --description "OIDC app for integration with Warpgate" \ --client-id <OAuth_client_ID> \ --authorized-scopes openid,email,profile,groups \ --group-distribution-type assigned-groupsWhere:
--organization-id: ID of the organization you want to create your OIDC app in. This is a required setting.--name: OIDC app name. This is a required setting.--description: OIDC app description. This is an optional setting.--client-id: OAuth client ID you got in the previous step. This is a required setting.--authorized-scopes: Specify the same attributes as when creating the OAuth client.--group-distribution-type: Specifyassigned-groupsto provide to Warpgate only the groups added to the application.
Result:
id: ek0o663g4rs2******** name: warpgate-oidc-app organization_id: bpf2c65rqcl8******** group_claims_settings: group_distribution_type: ASSIGNED_GROUPS client_grant: client_id: ajeqqip130i1******** authorized_scopes: - openid - email - profile - groups status: ACTIVE created_at: "2026-09-12T10:51:28.790866Z" updated_at: "2026-09-12T12:37:19.274522Z"Save the ID of the new OIDC app.
Create a user group and add users to it
Organize users who need the same Warpgate access level into an organization group. Then map the group name to a Warpgate access role.
Create a group
Create a group named warpgate-users.
To create a group, you need at least the organization-manager.groups.editor role for the organization.
-
Log in to Yandex Identity Hub
. -
In the left-hand panel, select
Groups. -
In the top-right corner of the page, click
Create group. -
Enter a name and description for the group.
The name must be unique within the organization and satisfy the relevant requirements:
- It must be from 1 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
Optionally, add labels:
- Click Add label.
- Add a label in
key: valueformat. - Press Enter.
-
Click Create group.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id.
If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
-
See the description of the command for creating a Yandex Identity Hub user group:
yc organization-manager group create --help -
To create a user group in Yandex Identity Hub, run this command:
yc organization-manager group create \ --name <group_name> \ --organization-id <organization_ID> \ --description <group_description> \ --labels <key>=<value>Where:
-
--name: User group name. This is a required setting. The name must be unique within the organization and satisfy the relevant requirements:- It must be from 1 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
--organization-id: Organization ID. This is an optional setting. -
--description: Text description of the user group. This is an optional setting. -
--labels: List of labels in<key>=<value>format. You can specify one or multiple labels separated by commas. This is an optional setting.
-
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the guides on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.
-
In the configuration file, describe the group parameters:
resource "yandex_organizationmanager_group" "my-group" { name = "<group_name>" description = "<group_description>" organization_id = "<organization_ID>" }Where:
-
name: Group name. The name must be unique within the organization and satisfy the relevant requirements:- It must be from 1 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
description: Group description. This is an optional setting. -
organization_id: ID of the organization to add the group to.
-
-
Create the resources:
-
In the terminal, navigate to the configuration file directory.
-
Make sure the configuration is correct using this command:
terraform validateIf the configuration is valid, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.
-
Apply the configuration changes:
terraform apply -
Type
yesand press Enter to confirm the changes.
Terraform will create all the required resources. You can check the new resources and their settings in the Cloud Center UI
or using this CLI command:yc organization-manager group list \ --organization-id <organization_ID> -
Use the Group.create REST API method for the Group resource or the GroupService/Create gRPC API call.
Add users to the group
Follow this guide to add all users who need the same Warpgate access level into the warpgate-users group.
Add the group to the OIDC app
For the warpgate-users group users to be able to sign in to Warpgate through your new OIDC application, and to provide the group in the groups attribute, explicitly add the group to the application.
Note
Users and groups added to an OIDC application can be managed by any user with the organization-manager.oauthApplications.userAdmin role or higher.
- Log in to Yandex Identity Hub
. - In the left-hand panel, navigate to
Apps and selectwarpgate-oidc-app. - Navigate to the Users and groups tab.
- Click
Add users. - In the window that opens, select the
warpgate-usersgroup. - Click Add.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id.
If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
-
Get the ID of the
warpgate-usersgroup. -
Add the group to the app:
yc organization-manager idp application oauth application add-assignments \ --id <app_ID> \ --subject-id <group_ID>Where:
--id: OIDC app ID.--subject-id:warpgate-usersgroup ID.
Tip
If you want to fine-tune user authentication in your applications, including authentication only from specific IP addresses, use authentication policies.
Authentication policies are a Yandex Identity Hub tool that allows you to flexibly configure access to applications by denying or allowing authentication for specific users in specific applications and/or from specific IP addresses. For more information, see Authentication policies in Yandex Identity Hub.
Set up the integration
To configure Warpgate integration with the new OIDC app, perform the setup both in Yandex Identity Hub and Warpgate.
Get the OIDC app connection credentials
- Log in to Yandex Identity Hub
. - In the left-hand panel, navigate to
Apps and selectwarpgate-oidc-app. - Under Identity provider (IdP) configuration on the Overview tab, expand the Additional attributes section and save the Client ID value (ClientID).
-
Create an app secret (only available for applications of the
Web Applicationtype).To do this, under App secrets, click Add secret, and in the window that opens:
-
Optionally, add a description for the new secret.
-
Click Create.
The window will display the generated application secret. Save this value.
Warning
If you refresh or close the application information page, you will not be able to view the secret again.
If you closed or refreshed the page before saving the secret, click Add secret to create a new one.
To delete a secret, in the list of secrets on the OIDC app page, click
in the secret row and select Delete. -
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id.
If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
-
Get the new OIDC app info:
yc organization-manager idp application oauth application get <app_ID>Save the
client_idvalue from theclient_grantsection: this is the Client ID you will need to configure Warpgate. -
Use the OAuth client secret you saved when creating the app. If you have not saved the secret, create a new one:
yc iam oauth-client-secret create \ --oauth-client-id <OAuth_client_ID>Save the
secret_valuevalue: this is the Client Secret you will need to configure Warpgate.
For Yandex Identity Hub, the issuer URL is https://auth.yandex.cloud. You will need it to configure Warpgate.
Configure a redirect URI
Warpgate uses the following address format: https://<warpgate_domain>/_warpgate/api/sso/return, where <warpgate_domain> is the external domainexternal_host parameter of the configuration file.
For example, if external_host: warpgate.example.com, the redirect URI will look like this:
https://warpgate.example.com/_warpgate/api/sso/return
Note
By default, Warpgate generates a redirect URI with @ (/@warpgate/api/sso/return). Yandex Identity Hub does not support this symbol. For Warpgate to replace the @warpgate prefix with _warpgate, specify return_url_prefix: _ in the Warpgate SSO provider configuration.
Specify the resulting address in the OAuth client settings:
-
Log in to Yandex Identity Hub
. -
In the left-hand panel, navigate to
Apps and selectwarpgate-oidc-app. -
At the top right, click
Edit. -
In the Redirect URI field, specify:
https://<warpgate_domain>/_warpgate/api/sso/return -
Click Save.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id.
If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
Update your OAuth client by providing the redirect URI:
yc iam oauth-client update \
--id <OAuth_client_ID> \
--redirect-uris "https://<warpgate_domain>/_warpgate/api/sso/return"
Warning
The redirect URI in Yandex Identity Hub and that in Warpgate must fully match, including the scheme, domain, and path.
Create an access role in Warpgate
On the Warpgate side, create an access role
- Log in to Warpgate using an administrator account.
- In the menu, go Config → Access roles.
- Click Add a role.
- Enter a name for the role, e.g.,
user, and save the changes.
In the next step, specify this role in the role_mappings parameter of the Warpgate configuration file.
Configure an SSO provider in the Warpgate configuration file
Note
For more information about setting up SSO for Warpgate, see this official Warpgate guide
Open the Warpgate configuration file (warpgate.yaml) and add a custom type SSO provider to it:
sso_providers:
- name: idh
auto_create_users: true
return_url_prefix: _
return_url_domain: external_host
label: SSO with Identity Hub
provider:
type: custom
client_id: <OIDC_app_client_id>
client_secret: <OIDC_app_secret>
issuer_url: https://auth.yandex.cloud
scopes: ["openid", "profile", "email", "groups"]
roles_claim: groups
role_mappings:
'warpgate-users': 'user'
external_host: <warpgate_domain>
Where:
name: Provider ID.auto_create_users: true: Warpgate automatically creates accounts for users who authenticate through Yandex Identity Hub for the first time. The username is taken from thepreferred_usernameattribute, or from theemailattribute if there is nopreferred_username.return_url_prefix: _: Replaces@with_in the redirect URI because Yandex Identity Hub does not support@in this address.return_url_domain: external_host: Warpgate generates the redirect URI based on the domain fromexternal_host.label: Login button label on the Warpgate authentication page.provider: OIDC provider settings:type: custom: Integration type for a custom OIDC-compliant identity provider; in this case, Yandex Identity Hub.client_idandclient_secret: Client ID and OIDC app secret you got earlier.issuer_url: Yandex Identity Hub issuer URL,https://auth.yandex.cloud.scopes: User attributes Warpgate requests from Yandex Identity Hub. These must match the attributes specified when configuring the OIDC application.roles_claim: groups: ID token attribute with the user’s groups. Thegroupsvalue matches the standard Yandex Identity Hub group attribute.role_mappings: Mapping between Yandex Identity Hub groups and Warpgate access roles. In our example, thewarpgate-usersgroup is mapped to theuserrole created earlier. Warpgate syncs only the roles specified in this parameter without touching the user’s other roles.
external_host: External domain of the Warpgate instance, e.g.,warpgate.example.com. It must match the domain specified in the Redirect URI field of the OIDC application.
Save the configuration file and restart Warpgate to apply the changes.
Make sure your application works correctly
- Log out of Warpgate if already logged in.
- Open the Warpgate login page at your instance URL, e.g.,
https://warpgate.example.com. - Click the login button of the same name as the
labelparameter value. - On the Yandex Cloud authentication page, log in as a user belonging to the
warpgate-usersgroup. - Make sure that after successful authentication the browser returns to Warpgate, and the user gets access to the interface with the
userrole. - You can look up the Users section in Warpgate to make sure the new user got the expected role.
How to delete the resources you created
To stop paying for the Yandex Identity Hub resources you created, delete the OIDC app.
Delete the new warpgate-users group too if you need to.
A bastion host is a separate VM with a public IP address in a protected infrastructure. It enables secure connections to other resources within the same infrastructure, which do not have public IP addresses. For more on configuring a bastion host, see Creating a bastion host.
An organization is the highest resource in the Yandex Cloud resource model hierarchy that consolidates the resources of all other services. It is also used for user management as well as authentication and authorization management. For more information, see Organization.
You can group Yandex Identity Hub users to simplify access management in Yandex Cloud. For more information, see User groups.