<commit_before>---
owner_slack: "#govuk-2ndline"
title: Expiring API tokens in Signon
parent: "/manual.html"
layout: manual_layout
section: Icinga alerts
---

[signon]: https://signon.publishing.service.gov.uk/api_users
[deploy-puppet]: https://deploy.production.govuk.digital/job/Deploy_Puppet/
[restart-app]: /manual/restart-application.html
[govuk-secrets]: https://github.com/alphagov/govuk-secrets
[gds-api-adapters]: https://github.com/alphagov/gds-api-adapters/blob/master/lib/gds_api.rb

One or more tokens for API Users are about to expire. You should rotate
expiring tokens to ensure the associated application keeps working.

As a working example, let's say we have an alert like *Content Publisher token
for Publishing API expires in X days*. In this example, the API User is
*Content Publisher* and the application is *Publishing API*.

- First login to [Signon], go to API Users and click on the API User.

> Check the *Last synced at* time to see if the API User is still using the
> application. If you are confident the token is unused, the you can just<commit_msg>Add docs on Trade Tariff Admin tokens<commit_after>---
owner_slack: "#govuk-2ndline"
title: Expiring API tokens in Signon
parent: "/manual.html"
layout: manual_layout
section: Icinga alerts
---

[signon]: https://signon.publishing.service.gov.uk/api_users
[deploy-puppet]: https://deploy.production.govuk.digital/job/Deploy_Puppet/
[restart-app]: /manual/restart-application.html
[govuk-secrets]: https://github.com/alphagov/govuk-secrets
[gds-api-adapters]: https://github.com/alphagov/gds-api-adapters/blob/master/lib/gds_api.rb

One or more tokens for API Users are about to expire. You should rotate
expiring tokens to ensure the associated application keeps working.

> If the tokens are
> `New London: Trade Tariff Admin (PaaS) token for New London: Trade Tariff Backend (PaaS)`
> see [Trade Tariff Admin on the Wiki](https://gov-uk.atlassian.net/wiki/spaces/PLOPS/pages/3155099649/Trade+Tariff+Admin)

As a working example, let's say we have an alert like *Content Publisher token
for Publishing API expires in X days*. In this example, the API User is
*Content Publisher* and the application is *Publishing API*.

- First login to [Signon], go to API Users and click on the API User.

> Check the *Last synced at* time to see if the API User is still using the
> application. If you are confident the token is unused, the you can just
{'fraction_non_alphanumeric': 0.10024752475247525, 'fraction_numerical': 0.0049504950495049506, 'mean_word_length': 4.574712643678161, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 9, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '12327', 'n_tokens_mistral': 788, 'n_tokens_neox': 747, 'n_words': 286}