stable

Clone or download

Read-only

A set of credential managed by the dynamic credentials plugin can be revoked

Since I'm a lazy contributor and the plugin does not yet contains usable data and is not yet released this contribution does not come with a ForgeUpgrade to handle the DB schema changes. To be able to test it you will need to uninstall/re-install the plugin. In order to test, you can generate a keypair with this code snippet: $keypair = sodium_crypto_sign_keypair(); $secret_key = sodium_crypto_sign_secretkey($keypair); $public_key = sodium_crypto_sign_publickey($keypair); var_dump(base64_encode($public_key), base64_encode($secret_key)); You can generate a valid signature for the query with this code snippet: $secret_key = base64_decode('<your_secret_key>'); $domain = 'tuleap-web.tuleap-aio-dev.docker'; $username = 'forge__dynamic_credential-identifier'; var_dump(base64_encode(sodium_crypto_sign_detached($domain . $username, $secret_key))); This is part of story #11239: generate dynamic credentials from HashiCorp Vault into a Tuleap instance Change-Id: I75d281bb7f14415fc3d502d80aaae5b7f7eba36c

Modified Files

Name
M plugins/dynamic_credentials/db/install.sql +2 −1 Go to diff View file
M plugins/dynamic_credentials/include/Credential/CredentialDAO.php +12 −0 Go to diff View file
A plugins/dynamic_credentials/include/Credential/CredentialRemover.php +50 −0 Go to diff View file
M plugins/dynamic_credentials/include/REST/DynamicCredentialsResource.php +37 −0 Go to diff View file
M plugins/dynamic_credentials/include/autoload.php +3 −2 Go to diff View file
A plugins/dynamic_credentials/phpunit/Credential/CredentialRemoverTest.php +44 −0 Go to diff View file
M plugins/dynamic_credentials/tests/rest/DynamicCredentialsTest.php +50 −0 Go to diff View file