Skip to content

feat/fix: iframe plugins, CSP management, mc-infra-manager v0.12 sync, and API improvements#71

Merged
MZC-CSC merged 20 commits into
m-cmp:mainfrom
MZC-CSC:develop
May 20, 2026
Merged

feat/fix: iframe plugins, CSP management, mc-infra-manager v0.12 sync, and API improvements#71
MZC-CSC merged 20 commits into
m-cmp:mainfrom
MZC-CSC:develop

Conversation

@dogfootman
Copy link
Copy Markdown
Member

@dogfootman dogfootman commented May 20, 2026

Summary

  • fix(WEB-BUG-014): iframe plugins 화면 미표시 수정 및 -fe 서비스 분리
  • feat(FR-FW-003): mc-infra-manager v0.12 API 변경사항 동기화 및 UX 개선
    • cb-tumblebug v0.12.9 mci→infra API 경로 전면 갱신
  • feat(costanalysis): mc-cost-optimizer-fe iframe 추가 (workspace/project guard 포함)
  • fix(api): /api/getapihosts 엔드포인트 관련 수정
    • getapihosts 응답 포맷 수정 (iframe.js expectation 맞춤)
    • IFRAME_TARGET_IS_HOST port-only transform 제거 (HTTPS/HSTS 비호환)
    • api.yaml fallback + proxy cache auto-refresh
  • fix(readyz): mc-iam-manager registry에서 readyz operationId 자동 탐색
  • feat(api): queryParamTypes 타입 메타데이터로 queryParam 검증/정규화 지원
  • fix(web-front/WEB-BUG-013): RecommendSpec/Cluster weight·limit 타입 수정 (string→number)

yh-noh and others added 20 commits May 6, 2026 14:07
Buffalo→Echo 마이그레이션 과정에서 누락된 /api/getapihosts 엔드포인트 복구.

- MCIAM_USE=false: api.yaml Services에서 BaseURL 추출
- MCIAM_USE=true: RegistryCache 우선, 캐시 미적재 시 mc-iam-manager
  ListMcmpApisServices 자동 호출하여 캐시 채운 뒤 반환
- IFRAME_TARGET_IS_HOST=true: BaseURL을 :port/path 형식으로 변환
- IframeTargetIsHost 환경변수 Config에 추가
- RegistryCacheInterface에 GetAllServices() 메서드 추가
fix(api): add missing POST /api/getapihosts endpoint
getapihosts: MCIAM_USE=true일 때 api.yaml을 기본값으로, RegistryCache로 override.
  mc-iam-manager 레지스트리에 없는 서비스(mc-cost-optimizer 등)도 항상 포함.

proxy: MCIAM_USE=true + RegistryCache 비어 있을 때 ListMcmpApisServices 자동 갱신.
  UpdateFrameworkService 후 invalidate된 캐시가 복원되어 등록된 BaseURL 반영.

front: GetApiHosts null 반환으로 변경, costoptimizer.iframe.js null 체크 추가.
  host 미설정 시 'Framework not found'가 URL로 사용되는 크래시 방지.
…istry

readyz_api.js: listFrameworkServices()에서 ServiceActions도 반환.
  buildFrameworkList()에서 ResourcePath가 /readyz로 끝나는 action 자동 탐색.
  READYZ_OPERATIONID_MAP은 레지스트리 미등록 서비스 폴백으로만 사용.

proxy.go: api.yaml에 action 없으면 RegistryCache ActionSpec으로 fallback.
  mc-admin-cli api.yaml에 없는 action(예: getReadyz)도 레지스트리 기반으로 처리.

api_spec.go: GetService() 메서드 추가 (action 없이 service 정보만 조회).
…oject guard

- costoptimizer.iframe.js: workspace/project 미선택 시 경고 표시, project 변경 시 iframe 재로드
- cloudoverview.js: Add Service 기능 추가 (CreateFrameworkService POST 호출)
- readyz_api.js: createFrameworkServiceUrl 함수 추가
- conf/api.yaml: mc-iam-manager CreateFrameworkService (POST /api/mcmp-apis) 등록
- cloudoverview.html: Readyz 섹션 Add Service 버튼 추가
…S/HSTS incompatible)

IFRAME_TARGET_IS_HOST=true일 때 DB URL에서 :port만 추출 후 브라우저 origin을 붙이는
로직이 HSTS 환경에서 프로토콜이 https://로 강제되어 http 전용 포트 접근 불가 문제 발생.
GetApiHosts가 DB full URL을 그대로 전달하도록 변환 로직을 비활성화.
…003-08)

- conf/api.yaml mc-infra-manager 섹션 88개 resourcePath 치환
  - /mci/ → /infra/, /vm/ → /node/, /subgroup/ → /nodegroup/
  - /mciDynamic → /infraDynamic, /systemMci → /systemInfra 등
- GeneratePresignedURL: method GET→POST, presignedUrl suffix 추가 (B-1)
- ListSpec: FilterSpecsByRange shim으로 대체 (B-2, v0.12.9 제거)
- AnalyzeProvisioningRiskDetailed: /tumblebug prefix 이중 적용 버그 수정 (C)
- PostFileAndCmdToMci: v0.12.9 경로 갱신 (FR-003-02 연동)
- services.mc-infra-manager.version: 0.9.11 → 0.12.9

검증:
- swagger 매칭: 336/339개 (3개 의도적 shim 제외)
- 1차 API 테스트: 339/339개 PASS (404 없음)
- api/internal/handler/proxy.go: RegisterCredential hybrid encryption (RSA-OAEP + AES-256-GCM)
- conf/webconsole_menu_resources.yaml: CSP Accounts 메뉴 추가 (menunumber 1360)
- front/cloudsps/cspaccounts: CSP 계정 목록/상세 화면 신규
- front/cloudsps/connections: Connection Config 목록/상세 화면 신규
- front/cloudsps/credentials: 화면 구조 개선 및 credential holder API 연동
- front/common/api/services: connection_config_api, credential_holder_api 모듈 신규
…(string→number)

중첩 필드 priority.policy[].weight 및 top-level limit 필드를
string 리터럴 → number 리터럴로 수정.

- serverrecommendation.js: weight "0.3"→0.3, "1.0"→1.0, limit "1000"→1000
- pmk_serverrecommendation.js: weight "0.3"→0.3, limit "1000"→1000
- clusterrecommendation.js: weight "0.3"→0.3, limit "1000"→1000

원인: CommonRequest.Request가 interface{}로 marshal되어 중첩 필드는
requestCoerce 도달 불가. json.Marshal(float64)은 올바른 JSON 타입 출력.
CommonRequest에 QueryParamTypes 필드 추가.
프론트가 queryParamTypes를 전송하면 백엔드가 tumblebug forwarding 전에
string 값을 int/float/bool 기준으로 검증·정규화한다.

- model/request.go: QueryParamTypes map[string]string 필드 추가
- proxy.go: coerceQueryParams 함수 추가 (int/float/bool 검증 + 정규화)
  - int: strconv.Atoi 검증 후 Itoa로 재포맷 (leading zero 정규화)
  - float: ParseFloat 검증 후 'f' 포맷 출력 (scientific notation 방지)
  - bool: ParseBool 검증 후 FormatBool로 정규화 ("TRUE"→"true")
- QueryParamTypes 없으면 기존 동작 그대로 (하위 호환)
- Rename operationId and resourcePath: mci→infra, vm→node, subgroup→nodegroup (49 keys in api.yaml)
- Update frontend JS to use renamed operationIds (mci_api.js, import_api.js, remotecmd_api.js, etc.)
- Fix response key access: .mci → .infra in dashboard, monitoring, log JS files
- Fix type mismatch: limit/weight params changed from string to correct numeric type
- Unify serverrecommendation priority UI: replace dynamic connection select with Seoul/London/NewYork
- Add inline loading spinner to spec recommendation modal (MCI and PMK)
…tion

Register POST /api/getapihosts route that returns service BaseURL map from api.yaml.
Required by iframe.js (GetApiHosts) used by data-manager, app-manager, workflow, cost-optimizer plugins.
iframe.js accesses responseData[name].BaseURL (object), not a plain string.
Return {BaseURL: string} per service instead of a flat string map.
Replace inline getapihosts implementation with proper handler from develop:
- api/internal/handler/apihosts.go: GetApiHosts with RegistryCache + api.yaml fallback
- api/internal/service/registry_cache.go: GetAllServices() support
- api/internal/config/config.go: IframeTargetIsHost, SetupYaml config fields
- api/cmd/main.go: disklookup, adminBFF 라우트 추가 (develop)
- api/internal/handler/proxy.go: QueryParams interface{} 방식 + RegistryCache fallback 적용 (develop)
- api/internal/model/request.go: QueryParams map[string]interface{} 타입 적용 (develop)
- serverrecommendation.js/html: Seoul/London/NewYork UI + spec-search-loading 유지 (ours)
…a-v012-patch

feat(FR-FW-003): mc-infra-manager v0.12 API 동기화 및 Spec Recommendation UX 개선
- api.yaml services에 -fe 서비스 4종 추가:
  mc-application-manager-fe, mc-workflow-manager-fe,
  mc-cost-optimizer-fe, mc-data-manager-fe
- iframe.js 3종 GetApiHosts() 호출을 -fe 서비스명으로 변경
- host null 체크, 동적 세션 토큰, workspace/project 선택 검증 적용
- project 변경 이벤트 핸들러 추가 (costoptimizer.iframe.js 패턴 통일)
fix(WEB-BUG-014): iframe 플러그인 3종 화면 미표시 수정 및 -fe 서비스 분리
@MZC-CSC MZC-CSC merged commit d5dc5fb into m-cmp:main May 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants