mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-04-29 11:54:49 +00:00
* fix: Operatelog plaintext storage AKSK * perf: Encrypt some field when saving operatelog * fix: Operatelog plaintext storage AKSK --------- Co-authored-by: jiangweidong <1053570670@qq.com>
15 lines
326 B
Python
15 lines
326 B
Python
import re
|
|
|
|
from werkzeug.local import Local
|
|
|
|
|
|
thread_local = Local()
|
|
exclude_encrypted_fields = ('secret_type', 'secret_strategy', 'password_rules')
|
|
similar_encrypted_pattern = re.compile(
|
|
'password|secret|token|passphrase|private|key|cert', re.IGNORECASE
|
|
)
|
|
|
|
|
|
def _find(attr):
|
|
return getattr(thread_local, attr, None)
|