<commit_before>Anchor Token Server
===================

Anchor Token Server is a small web application which allows users and services
to request, approve, and verify OAuth2 tokens.

The intended use case is a fleet of related, but not necessarily integrated,
web services. Rather than integrate OAuth2 server functionality into each
service (and give each of them access to user authentication details, etc.) we
centralise user authentication and token management.

Architecture
------------

There are four roles involved in a deployment of Anchor Token Server:

- A *user* is an agent (typically a human or a web-browser driven by a human)
trying to use a service via a client.

- A *client* is a program trying to interact with a service on behalf of
a user.

- A *service* is a program which provides some resource or performs some action
for a user.

- A *server* is a program (this program!) which allows clients, users, and
services to request, approve, and verify tokens.

Security considerations
-----------------------

All interactions with Anchor Token Server itself and between the other parties
contain sensitive information and MUST be protected with correctly configured
TLS. All parties SHOULD validate the certificate used by Anchor Token Server.

<commit_msg>Add diagram (directly from GitHub)<commit_after>Anchor Token Server
===================

Anchor Token Server is a small web application which allows users and services
to request, approve, and verify OAuth2 tokens.

The intended use case is a fleet of related, but not necessarily integrated,
web services. Rather than integrate OAuth2 server functionality into each
service (and give each of them access to user authentication details, etc.) we
centralise user authentication and token management.

Architecture
------------

There are four roles involved in a deployment of Anchor Token Server:

- A *user* is an agent (typically a human or a web-browser driven by a human)
trying to use a service via a client.

- A *client* is a program trying to interact with a service on behalf of
a user.

- A *service* is a program which provides some resource or performs some action
for a user.

- A *server* is a program (this program!) which allows clients, users, and
services to request, approve, and verify tokens.

![Interactions between components](https://raw.githubusercontent.com/anchor/anchor-token-server/master/docs/architecture.png)

Security considerations
-----------------------

All interactions with Anchor Token Server itself and between the other parties
contain sensitive information and MUST be protected with correctly configured
TLS. All parties SHOULD validate the certificate used by Anchor Token Server.


{'fraction_non_alphanumeric': 0.07908351810790835, 'fraction_numerical': 0.0014781966001478197, 'mean_word_length': 4.078799249530957, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '3032586', 'n_tokens_mistral': 635, 'n_tokens_neox': 610, 'n_words': 383}