This pull request includes changes to introduce token expiry checks and update user notifications in the deploy-board and deploy-service modules. The most important changes include adding a warning message for deprecated script tokens, implementing token expiry logic, and updating tests to cover the new functionality.
This pull request includes changes to introduce token expiry checks and update user notifications in the
deploy-board
anddeploy-service
modules. The most important changes include adding a warning message for deprecated script tokens, implementing token expiry logic, and updating tests to cover the new functionality.User Interface Updates:
deploy-board/deploy_board/templates/users/script_token_deprecation.html
: Added a warning message about script token deprecation and expiration after 180 days.deploy-board/deploy_board/templates/users/users_config.tmpl
: Included the script token deprecation message in the user configuration template. [1] [2]deploy-board/deploy_board/templates/users/users_moved_message.html
: Updated appearance to match the style of script token.Backend Changes:
deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/TokenAuthenticationFactory.java
: AddedcheckTokenExpiry
property and methods to handle token expiry checks. [1] [2] [3]deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/TokenRoles.java
: Updated token expiry logic to use a 180-day validation period. [1] [2]deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/security/TeletraanScriptTokenProvider.java
: Implemented token expiry validation in theTeletraanScriptTokenProvider
class. [1] [2]Testing Updates:
deploy-service/teletraanservice/src/test/java/com/pinterest/teletraan/security/TeletraanScriptTokenProviderTest.java
: Updated tests to include scenarios for token expiry and parameterized tests forcheckTokenExpiry
. [1] [2] [3] [4]Launched Teletraan service locally and confirmed that all 3 cases are working as expected
checkTokenExpiry
not setcheckTokenExpiry
set to truecheckTokenExpiry
set to false