Tailscale
This guide explains how to set up single sign-on (SSO) between SmartLink and Tailscale using OpenID Connect with WebFinger for simplified configuration.
Prerequisites
- Tailscale account with a plan supporting custom SSO (Business or Enterprise)
- Administrative access to Tailscale
- Domain verified in Tailscale
- Application configured in SmartLink with OpenID Connect
- WebFinger configured on SmartLink (optional but recommended)
Overview
Tailscale supports SSO authentication via OpenID Connect with a unique feature: WebFinger. This allows users to simply log in with their email address without needing to know the provider's URL.
Configuration in SmartLink
1. Create the application
- Log in to SmartLink as an administrator
- Go to Applications → Add
- Create a new application:
- Name: Tailscale
- URL:
https://login.tailscale.com - Description: VPN Mesh Tailscale
- Icon: Choose or upload the Tailscale icon
2. Configure OpenID Connect
- In the Authentication tab
- Select OpenID Connect as the authentication type
- Configure the parameters:
- Client ID:
tailscale-xxxxxx(will be generated automatically) - Client Secret:
secret-xxxxxx(will be generated automatically) - App ID:
[appid](unique identifier of the application in SmartLink) - Client Type: Confidential
- Client ID:
3. Configure Redirect URLs
Add the following URLs to Allowed Redirect URLs:
https://login.tailscale.com/a/oauth_response
https://controlplane.tailscale.com/a/oauth_response
4. Configure Scopes and Claims
Required scopes:
openidprofileemail
Additional claims (optional):
groups: To map SmartLink groups to Tailscale ACLspicture: For user avatar
5. WebFinger Configuration (Recommended)
WebFinger allows users to log in with their email instead of the full provider URL.
Verify WebFinger Configuration
Your domain (not your SmartLink) should automatically expose WebFinger at:
https://<yourdomain>/.well-known/webfinger
Test with:
curl "https://example.com/.well-known/webfinger"
The response should contain:
{
"subject": "acct:user@example.com",
"links": [
{
"rel": "http://openid.net/specs/connect/1.0/issuer",
"href": "https://your-smartlink.link.vaultys.org/api/oidc/[appid]"
}
]
}
Configuration in Tailscale
1. Access SSO Settings
- Log in to Tailscale Admin Console
- Go to Settings → Identity provider
- Click on Configure custom OIDC
2. Configure OpenID Connect Provider
Fill in the following fields:
- Issuer URL:
https://your-smartlink.link.vaultys.org - Client ID:
[Copy from SmartLink] - Client Secret:
[Copy from SmartLink]
Note: The application created in SmartLink automatically generates an
[appid]which will be used in the endpoint URLs.
3. Endpoint Configuration (if not auto-discovered)
If Tailscale does not automatically detect the endpoints via .well-known/openid-configuration, configure manually:
- Configuration URL:
https://your-smartlink.link.vaultys.org/api/oidc/[appid]/.well-known/openid-configuration - Authorization endpoint:
https://your-smartlink.link.vaultys.org/api/oidc/[appid]/authorize - Token endpoint:
https://your-smartlink.link.vaultys.org/api/oidc/[appid]/token - UserInfo endpoint:
https://your-smartlink.link.vaultys.org/api/oidc/[appid]/userinfo - JWKS endpoint:
https://your-smartlink.link.vaultys.org/api/oidc/[appid]/jwks
4. Attribute Mapping
User mapping configuration:
- Email claim:
email - Name claim:
nameoremail - Groups claim:
groups(if using group-based ACLs)
5. Domain Configuration
In Email domain requirements:
- Add your email domain:
@example.com - Enable Allow only verified domains
WebFinger Configuration for Simplified Login
Advantages of WebFinger
With WebFinger configured, users can log in using just:
user@example.com
Instead of:
https://your-smartlink.link.vaultys.org
DNS Configuration for WebFinger
If your email domain is different from the SmartLink domain, add a redirection:
- Create a CNAME or A record for
webfinger.example.com - Configure your web server to redirect:
location /.well-known/webfinger {
return 307 https://your-smartlink.link.vaultys.org/.well-known/webfinger$is_args$args;
}
Test WebFinger with Tailscale
- On the Tailscale login page
- Enter your email:
user@example.com - Tailscale should automatically discover SmartLink as the provider
- You will be redirected to SmartLink for authentication
Group-Based ACL Configuration
1. Enable Groups in SmartLink
- In the Tailscale application on SmartLink
- Ensure the
groupsscope is enabled - Verify that groups are returned in the claims
2. Configure Tailscale ACLs
Example ACL configuration in Tailscale:
{
"groups": {
"group:admin": ["user@example.com"],
"group:dev": ["tag:dev-servers"]
},
"acls": [
{
"action": "accept",
"src": ["group:admin"],
"dst": ["*:*"]
},
{
"action": "accept",
"src": ["group:dev"],
"dst": ["tag:dev-servers:*"]
}
],
"tagOwners": {
"tag:dev-servers": ["group:admin"]
}
}
3. Automatic Group Synchronization
If configured correctly, SmartLink groups will be mapped to Tailscale:
- SmartLink group
developers→group:developersin Tailscale - SmartLink group
admins→group:adminsin Tailscale
Configuration Testing
1. Initial Connection Test
- Log out of Tailscale
- Go to login.tailscale.com
- Enter your corporate email
- You should be redirected to SmartLink
- Authenticate with your SmartLink credentials
- You should be connected to Tailscale
2. Test with Tailscale Client
- Install the Tailscale client on your device
- Click on Log in
- Use your corporate email
- The client should open a browser to SmartLink
- After authentication, the client should connect