# Connect eeID

> Setting up eeID, the Estonian Internet Foundation's authentication service, as the login provider of Oktul eID SSO, from the test service to production.
>
> Documentation for Oktul eID SSO for Jira, for Jira Cloud, by Oktul: https://oktul.com/docs/plugins/eid-sso/eeid/

[eeID](https://eeid.ee/) is the authentication service of the Estonian Internet Foundation. Any
organisation can sign up on its own. The test service is free, and production is charged per
authentication from a prepaid balance ([eeID's price list](https://eeid.ee/pricing)).

Through eeID the app accepts **Smart-ID, Mobile-ID and the Estonian ID card**, for people with an
Estonian, Latvian or Lithuanian personal code.

## What you need

- An account at [eeid.ee](https://eeid.ee/), with billing details for a production service
- A service of the type **Authentication**, approved by the Estonian Internet Foundation
- The redirect URL from the app's admin page

## At eeID

eeID's own guide is its [documentation](https://internetee.github.io/eeID-DOC/#getting-started).

1. **Create an account, and an organisation if the service belongs to one**
2. **Under Services, select Create New Service** Type: Authentication. Environment: Test for a first setup. A service exists in one environment. Production is a second service.
3. **Under Redirection URLs, enter the redirect URL from the app** It is shown in the eeID row on the Login providers tab, and ends in /cb.
4. **Set Authentication scope to openid only** The app asks for nothing else. The email, phone and webauthn scopes add personal data or methods the app does not use.
5. **Under Authentication methods, choose Smart-ID, Mobile-ID and ID card**
6. **Submit the service for approval** The Estonian Internet Foundation reviews it. An approved service has a Client ID and a Secret.

## In the app

1. **On the Login providers tab, select Add a provider and choose eeID**
2. **Choose the Environment** eeID test service or eeID production service, to match the service you created.
3. **Enter the Client ID and the Client secret**
4. **Select Save and connect, and approve Atlassian's dialog** It names https://test-auth.eeid.ee for the test service, or https://auth.eeid.ee for production.

The secret is write-only. See [secrets are write-only](../providers/#secrets-are-write-only).

## What the app asks of eeID, and what it accepts

| Part of the login | What the app asks for or accepts |
|---|---|
| Scope | `openid` |
| Client authentication | The client secret, as HTTP Basic, with PKCE |
| Each request | Asks eeID to authenticate the person again |
| Method (`amr`) | `smartid`, `mID` or `idcard`. Any other method is refused |
| Level of assurance (`acr`) | `high`. Not a setting |
| Person | The country and personal code in `sub`, such as `EE60001019906`, for Estonia, Latvia or Lithuania |

eeID also offers cross-border eIDAS logins, passkeys and other methods. The app refuses them with
*This login method cannot be used*, because for those methods eeID's `sub` can hold a document
number or another identifier in place of a personal code. Leave them off the service.

<Aside type="note" title="The Latvian and Lithuanian ID cards">
eeID's ID card method is the Estonian ID card. For Latvian and Lithuanian ID cards, see
[Dokobit](../dokobit/).
</Aside>

## Test it

eeID publishes [test users](https://internetee.github.io/eeID-DOC/#testing) for its test service.
A test user logs in to Jira only if one of your users in the app holds that test person's
personal code. Any other test person gets *Account not found*, which shows the path works as far
as the user lookup.

## Move from the test service to production

1. **Create a second service at eeID, in the production environment** With the same redirect URL. It gets its own Client ID and Secret.
2. **In the eeID row, set Environment to eeID production service** Enter the new Client ID and the new Client secret, and save.
3. **Approve Atlassian's dialog for https://auth.eeid.ee**
4. **Remove the test service's approval** It is listed under Approvals no provider uses, with Remove approval.

<Aside type="caution">
Changing the environment or the client stops every login through eeID until the new secret is
saved and the new host approved. Do it with a break-glass admin at hand.
</Aside>

## Related

- [Login providers](../providers/)
- [What a user sees](../logging-in/)
- [Troubleshooting](../troubleshooting/)

---

A problem or a question? Write to [support@oktul.com](mailto:support@oktul.com) or open a request in the [Help Center](https://support.oktul.com).
