Skip to content

Update default auth_token_exp_timeout to 15 minutes.#7167

Merged
davidjiglesias merged 2 commits into4.0.4from
fix-jwt-token-duration
Jan 13, 2021
Merged

Update default auth_token_exp_timeout to 15 minutes.#7167
davidjiglesias merged 2 commits into4.0.4from
fix-jwt-token-duration

Conversation

@Selutario
Copy link
Contributor

Related issue
Closes #7163

Description

Hi team!

This PR updates the default expiration timeout of the API JWT tokens.

Tests results

QA exp_timeout

python3 -m pytest integration/test_api/test_config/test_jwt_token_exp_timeout/
============================================================================================ test session starts =============================================================================================
platform linux -- Python 3.8.2, pytest-6.2.1, py-1.10.0, pluggy-0.13.1
rootdir: /wazuh-qa/tests/integration, configfile: pytest.ini
plugins: html-3.1.1, testinfra-5.0.0, metadata-1.11.0, tavern-1.12.2, cov-2.10.1
collected 4 items                                                                                                                                                                                            

integration/test_api/test_config/test_jwt_token_exp_timeout/test_jwt_token_exp_timeout.py .ss.                                                                                                         [100%]

================================================================================= 2 passed, 2 skipped, 3 warnings in 47.60s ==================================================================================

Unittests

API

python3 -m pytest api/api/test/ --disable-warnings
============================================================================================ test session starts =============================================================================================
platform linux -- Python 3.8.5, pytest-6.0.1, py-1.9.0, pluggy-0.13.1
rootdir: /home/selu/Git/wazuh/api
plugins: trio-0.6.0, asyncio-0.14.0
collected 231 items                                                                                                                                                                                          

api/api/test/test_alogging.py ........                                                                                                                                                                 [  3%]
api/api/test/test_authentication.py ..........                                                                                                                                                         [  7%]
api/api/test/test_configuration.py .......                                                                                                                                                             [ 10%]
api/api/test/test_util.py ...................................                                                                                                                                          [ 25%]
api/api/test/test_validator.py ....................................................................................................................................................................... [ 98%]
....                                                                                                                                                                                                   [100%]

====================================================================================== 231 passed, 14 warnings in 0.98s ======================================================================================

Regards,
Selu.

@Selutario Selutario self-assigned this Jan 13, 2021
@Selutario Selutario linked an issue Jan 13, 2021 that may be closed by this pull request
@davidjiglesias davidjiglesias merged commit b8c47b0 into 4.0.4 Jan 13, 2021
@davidjiglesias davidjiglesias deleted the fix-jwt-token-duration branch January 13, 2021 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set JWT default duration to 15 minutes

2 participants