Repository navigation
fix(iam): 설치 시 OIDC 클라이언트 보장, AWS 부트스트랩 소속 IdP Config 전달과 .env 검증 - #115
Merged
Merged
Conversation
클린 설치 후 Keycloak 에 mciam-oidc-Client 가 없어 CSP 임시자격증명 발급이
401 invalid_client 로 실패하던 문제 보정 (IAM-BUG-040, BAR-1941).
admin-cli 사본이 배포 정본이라 mc-iam-manager 원본과 같은 수정을 반영.
- Step 6-1 ensure_oidc_client 추가 (non-fatal, 멱등)
- 없으면 생성: confidential, Service accounts ON, Direct access grants ON,
Standard flow OFF, secret=MC_IAM_MANAGER_KEYCLOAK_OIDC_CLIENT_SECRET,
audience mapper(access token aud 에 클라이언트 자신) 포함
- 있으면 설정은 유지하고 audience mapper 만 없을 때 추가, secret 불일치는 경고
- Step 3 POST /api/roles/csp 에 Step 2 IdP Config id(cspIdpConfigId)를 넘긴다. IAM 이 CspRole 에 소속 Config·계정과 idp_identifier(Config 의 Provider ARN)를 채운다. - MC_IAM_MANAGER_AWS_ACCOUNT_ID 가 12자리가 아니거나 MC_IAM_MANAGER_PUBLIC_DOMAIN 이 비었거나 내부 이름이면 잘못된 계정·Config 를 만들지 않고 skip 로그를 남긴다. - 계정·Config 조회는 이름이 정확히 같은 항목만 고른다(list 의 name 필터는 부분 일치). - 이미 있으면 갱신하지 않고, .env 값과 다르면 경고만 남긴다(.env 는 최초 설정용). - IdP Config 생성 시 audience(MC_IAM_MANAGER_KEYCLOAK_OIDC_CLIENT_NAME)를 함께 넣는다. Refs: IAM-BUG-040, IAM-BUG-042
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
개요
변경 (
conf/docker/conf/mc-iam-manager/1_setup_auto.sh)ensure_oidc_client: CSP 임시자격증명용 Keycloak OIDC 클라이언트(mciam-oidc-Client)를 보장합니다. 이전 IAM 이미지와 기존 설치를 보정하는 용도이며 멱등입니다. 없으면 생성하고, aud mapper 가 없으면 추가하며, secret 이 다르면 경고만 남깁니다.init_aws_csp_config(AWS CSP 부트스트랩)POST /api/roles/csp에 Step 2 IdP Config id(cspIdpConfigId)를 넘깁니다. IAM 이 CspRole 에 소속 Config·계정과idp_identifier(Config 의 Provider ARN)를 채웁니다..env값 검증:MC_IAM_MANAGER_AWS_ACCOUNT_ID가 12자리가 아니거나MC_IAM_MANAGER_PUBLIC_DOMAIN이 비었거나 내부 이름이면, 잘못된 계정·Config 를 만들지 않고 skip 로그를 남깁니다..env값과 다르면 경고만 남깁니다(.env는 최초 설정용, 이후 변경은 API).MC_IAM_MANAGER_KEYCLOAK_OIDC_CLIENT_NAME)를 함께 넣습니다.