Co-authored-by: charles liu <dearcharles.liu@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>tags/1.8.1
| @@ -11,6 +11,10 @@ def obfuscated_token(token: str) -> str: | |||
| return token[:6] + "*" * 12 + token[-2:] | |||
| def full_mask_token(token_length=20): | |||
| return "*" * token_length | |||
| def encrypt_token(tenant_id: str, token: str): | |||
| from models.account import Tenant | |||
| from models.engine import db | |||
| @@ -17,7 +17,7 @@ class EnvironmentVariableField(fields.Raw): | |||
| return { | |||
| "id": value.id, | |||
| "name": value.name, | |||
| "value": encrypter.obfuscated_token(value.value), | |||
| "value": encrypter.full_mask_token(), | |||
| "value_type": value.value_type.value, | |||
| "description": value.description, | |||
| } | |||