Add a toggle for opt-in JWT to project settings
What does this MR do and why?
Adds an opt_in_jwt
field to the project_ci_cd_settings
table. A future MR will add a toggle to the project CI/CD settings page that will allow users to toggle this feature. It defaults to false
.
When true
, it will require users to add an id-token
keyword (to be implemented in a future MR) to jobs that need a JWT.
Database
Migration up
main: == 20220614120415 AddToggleOptInJwt: migrating ================================
main: -- add_column(:project_ci_cd_settings, :opt_in_jwt, :boolean, {:default=>false, :null=>false})
main: -> 0.0091s
main: == 20220614120415 AddToggleOptInJwt: migrated (0.0112s) =======================
ci: == 20220614120415 AddToggleOptInJwt: migrating ================================
ci: -- add_column(:project_ci_cd_settings, :opt_in_jwt, :boolean, {:default=>false, :null=>false})
ci: -> 0.0058s
ci: == 20220614120415 AddToggleOptInJwt: migrated (0.0060s) =======================
Migration down
main: == 20220614120415 AddToggleOptInJwt: reverting ================================
main: -- remove_column(:project_ci_cd_settings, :opt_in_jwt, :boolean, {:default=>false, :null=>false})
main: -> 0.0051s
main: == 20220614120415 AddToggleOptInJwt: reverted (0.0100s) =======================
ci: == 20220614120415 AddToggleOptInJwt: reverting ================================
ci: -- remove_column(:project_ci_cd_settings, :opt_in_jwt, :boolean, {:default=>false, :null=>false})
ci: -> 0.0037s
ci: == 20220614120415 AddToggleOptInJwt: reverted (0.0058s) =======================
Screenshots or screen recordings
N/A
How to set up and validate locally
N/A
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #356986 (closed)
Edited by Andy Schoenen