Compare commits
7 Commits
ef7837b276
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 64032861e0 | |||
| ec866f2d05 | |||
| 89c126b469 | |||
| 118398fa68 | |||
| 05f4ed5b2a | |||
| ec39ba59be | |||
| cf8466aaf6 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -166,3 +166,5 @@ wheelhouse
|
||||
|
||||
# RS256 을 위한 적용 keys 폴더
|
||||
keys
|
||||
|
||||
msa-django-auth.code-workspace
|
||||
10
README.md
10
README.md
@ -12,6 +12,16 @@ python3 manage.py runserver 0.0.0.0:8000
|
||||
gunicorn auth_prj.wsgi:application --bind 0.0.0.0:8000 --workers 3
|
||||
```
|
||||
|
||||
## 2025-12-05 TRACE ENDPOINT 변경 ( v0.0.15 )
|
||||
* 변경전 static
|
||||
* 변경후 변수 처리
|
||||
* TRACE_ENDPOINT='test'
|
||||
* TRACE_SERVICE_NAME=''
|
||||
|
||||
## 2025-09-29 jaeger Endpoint 변경 ( v0.0.14 )
|
||||
* 변경전: endpoint="http://jaeger-collector.istio-system:4317",
|
||||
* 변경후: endpoint="http://jaeger-collector.observability.svc.cluster.local:4317",
|
||||
|
||||
## 2025-09-28 RS256변경 적용 ( v0.0.13 )
|
||||
* Docker Build base image 변경.
|
||||
* python:3.10-slim-buster > python:3.10-slim-bullseye
|
||||
|
||||
@ -34,6 +34,9 @@ else:
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = os.environ.get('SECRET_KEY', 'django-insecure-ec9me^z%x7-2vwee5#qq(kvn@^cs!!22_*f-im(320_k5-=0j5')
|
||||
SERVICE_PLATFORM = os.getenv("SERVICE_PLATFORM", "none")
|
||||
TRACE_SERVICE_NAME = os.getenv("TRACE_SERVICE_NAME", "msa-django-auth")
|
||||
TRACE_ENDPOINT = os.getenv("TRACE_ENDPOINT", "none")
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = int(os.environ.get('DEBUG', 1))
|
||||
|
||||
@ -27,14 +27,22 @@ if not settings.DEBUG:
|
||||
trace.set_tracer_provider(
|
||||
TracerProvider(
|
||||
resource=Resource.create({
|
||||
"service.name": "msa-django-auth",
|
||||
"service.platform": settings.SERVICE_PLATFORM,
|
||||
# "service.name": "msa-django-auth",
|
||||
"service.name": settings.TRACE_SERVICE_NAME,
|
||||
})
|
||||
)
|
||||
)
|
||||
|
||||
otlp_exporter = OTLPSpanExporter(
|
||||
endpoint="http://jaeger-collector.istio-system:4317",
|
||||
# endpoint="http://jaeger-collector.istio-system:4317",
|
||||
# endpoint="jaeger-collector.observability.svc.cluster.local:4317",
|
||||
endpoint=settings.TRACE_ENDPOINT,
|
||||
insecure=True,
|
||||
headers={
|
||||
"X-Scope-OrgID": settings.SERVICE_PLATFORM,
|
||||
"X-Service": settings.TRACE_SERVICE_NAME
|
||||
}
|
||||
)
|
||||
|
||||
trace.get_tracer_provider().add_span_processor(
|
||||
|
||||
@ -27,6 +27,7 @@ class CustomTokenObtainPairSerializer(TokenObtainPairSerializer):
|
||||
token["name"] = user.name
|
||||
token["grade"] = user.grade
|
||||
token["email"] = user.email # 선택적으로 추가 가능
|
||||
token["sub"] = user.email # 선택적으로 추가 가능
|
||||
|
||||
# Kong JWT 플러그인용 issuer 정보 추가
|
||||
token["iss"] = "msa-user"
|
||||
|
||||
Reference in New Issue
Block a user