Files
novalon-manage-system/test-suite/tests/e2e/test_jwt_secret.py
T
张翔 b0f91d74f5 feat: 统一JWT密钥配置并修复签名验证问题
修复前端签名生成中bodyString硬编码问题
添加start-frontend.sh脚本启动前端服务
统一manage-app和gateway的JWT密钥配置
修复Repository扫描路径问题
更新测试配置和依赖
重构表名映射为sys_user和sys_role
完善用户实体类字段映射
添加集成测试配置和测试用例
2026-04-02 12:28:49 +08:00

31 lines
793 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env python3
"""
测试JWT密钥
"""
import base64
# Gateway配置的secret(去掉enc:前缀)
encrypted_secret = "U2FsdGVkX1+vZ5Y9QmKxL8nN3rP7tW2jH4fG6dA8sB1cE5yN0zX3qV7wM4"
# Manage-app默认的secret
default_secret = "default-secret-key-change-in-production"
print("Gateway配置的secretBase64编码):")
print(f" {encrypted_secret}")
print(f" 长度: {len(encrypted_secret)}")
try:
decoded = base64.b64decode(encrypted_secret)
print(f"\n解码后:")
print(f" {decoded}")
print(f" 长度: {len(decoded)}")
except Exception as e:
print(f"\n解码失败: {e}")
print(f"\nManage-app默认secret:")
print(f" {default_secret}")
print(f" 长度: {len(default_secret)}")
print(f"\n两个secret是否相同: {encrypted_secret == default_secret}")