<commit_before># Security Model


*Nakadi* makes use of Oauth2 to provide security, there are three modes that can be 
configured. In order to configure security for *Nakadi* you need to edit the *Nakadi* configuration file and add oauth2
 validation endpoints. This is set via two environmental variables.
 
 * AuthenticationMode: Security model to use 
 
 * TokenInfoUrl: oauth2 endpoint to get token information

## OpenAuthenticationMode

Allows open access to *Nakadi*. This mode only exists for testing purposes.

## Token Validation

Validates the Token, and only the token

## Token and Scope Validation

Validates the scope of the token as well as the existence of the token. 
<commit_msg>add proper names of the modes, and clarify where to update these values<commit_after># Security Model


*Nakadi* makes use of Oauth2 to provide security, there are three modes that can be 
configured. In order to configure security for *Nakadi* you need to edit the *Nakadi* application.yml (env vars)
                                                                                      
and add oauth2
 validation endpoints. This is set via two environmental variables.
 
 * AuthenticationMode: Security model to use 
 
 * TokenInfoUrl: oauth2 endpoint to get token information

## Open

* AuthenticationMode: off


Allows open access to *Nakadi*. This mode only exists for testing purposes.

## Token Validation

* AuthenticationMode: basic

Validates the Token, and only the token

## Token and Scope Validation

* AuthenticationMode: full

Validates the scope of the token as well as the existence of the token. 

{'fraction_non_alphanumeric': 0.043316831683168314, 'fraction_numerical': 0.0037128712871287127, 'mean_word_length': 3.3821138211382116, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1813718', 'n_tokens_mistral': 413, 'n_tokens_neox': 391, 'n_words': 215}