OpenClaw SecretRef 설정: 보안 자격 증명 관리 가이드
여러 플랫폼의 API 키와 자격 증명을 관리하다 보면 어떤 항목을 안전하게 분리해야 할지 고민될 때가 많죠. 설정 파일 곳곳에 흩어진 비밀 정보를 체계적으로 관리하고 싶은 개발자분들을 위해, OpenClaw의 SecretRef가 지원하는 자격 증명 범위를 정리해 드릴게요.
이 가이드는 SecretRef의 표준 자격 증명 범위를 정의합니다.
범위 안내:
- 포함 대상: OpenClaw가 직접 생성하거나 갱신하지 않는, 사용자가 직접 제공하는 자격 증명입니다.
- 제외 대상: 런타임에서 생성되거나 순환(rotate)되는 자격 증명, OAuth 리프레시 토큰, 세션 관련 아티팩트입니다.
지원되는 자격 증명 (Supported credentials)
섹션 제목: “지원되는 자격 증명 (Supported credentials)”openclaw.json 대상 (secrets configure + secrets apply + secrets audit)
섹션 제목: “openclaw.json 대상 (secrets configure + secrets apply + secrets audit)”models.providers.*.apiKeymodels.providers.*.headers.*skills.entries.*.apiKeyagents.defaults.memorySearch.remote.apiKeyagents.list[].memorySearch.remote.apiKeytalk.apiKeytalk.providers.*.apiKeymessages.tts.providers.*.apiKeytools.web.fetch.firecrawl.apiKeyplugins.entries.brave.config.webSearch.apiKeyplugins.entries.google.config.webSearch.apiKeyplugins.entries.xai.config.webSearch.apiKeyplugins.entries.moonshot.config.webSearch.apiKeyplugins.entries.perplexity.config.webSearch.apiKeyplugins.entries.firecrawl.config.webSearch.apiKeyplugins.entries.tavily.config.webSearch.apiKeytools.web.search.apiKeytools.web.x_search.apiKeygateway.auth.passwordgateway.auth.tokengateway.remote.tokengateway.remote.passwordcron.webhookTokenchannels.telegram.botTokenchannels.telegram.webhookSecretchannels.telegram.accounts.*.botTokenchannels.telegram.accounts.*.webhookSecretchannels.slack.botTokenchannels.slack.appTokenchannels.slack.userTokenchannels.slack.signingSecretchannels.slack.accounts.*.botTokenchannels.slack.accounts.*.appTokenchannels.slack.accounts.*.userTokenchannels.slack.accounts.*.signingSecretchannels.discord.tokenchannels.discord.pluralkit.tokenchannels.discord.voice.tts.providers.*.apiKeychannels.discord.accounts.*.tokenchannels.discord.accounts.*.pluralkit.tokenchannels.discord.accounts.*.voice.tts.providers.*.apiKeychannels.irc.passwordchannels.irc.nickserv.passwordchannels.irc.accounts.*.passwordchannels.irc.accounts.*.nickserv.passwordchannels.bluebubbles.passwordchannels.bluebubbles.accounts.*.passwordchannels.feishu.appSecretchannels.feishu.encryptKeychannels.feishu.verificationTokenchannels.feishu.accounts.*.appSecretchannels.feishu.accounts.*.encryptKeychannels.feishu.accounts.*.verificationTokenchannels.msteams.appPasswordchannels.mattermost.botTokenchannels.mattermost.accounts.*.botTokenchannels.matrix.accessTokenchannels.matrix.passwordchannels.matrix.accounts.*.accessTokenchannels.matrix.accounts.*.passwordchannels.nextcloud-talk.botSecretchannels.nextcloud-talk.apiPasswordchannels.nextcloud-talk.accounts.*.botSecretchannels.nextcloud-talk.accounts.*.apiPasswordchannels.zalo.botTokenchannels.zalo.webhookSecretchannels.zalo.accounts.*.botTokenchannels.zalo.accounts.*.webhookSecretchannels.googlechat.serviceAccountvia siblingserviceAccountRef(compatibility exception)channels.googlechat.accounts.*.serviceAccountvia siblingserviceAccountRef(compatibility exception)
auth-profiles.json 대상 (secrets configure + secrets apply + secrets audit)
섹션 제목: “auth-profiles.json 대상 (secrets configure + secrets apply + secrets audit)”profiles.*.keyRef(type: "api_key"; unsupported whenauth.profiles.<id>.mode = "oauth")profiles.*.tokenRef(type: "token"; unsupported whenauth.profiles.<id>.mode = "oauth")
참고 사항:
- Auth-profile 플랜 대상은
agentId가 필요해요. - 플랜 항목은
profiles.*.key/profiles.*.token을 대상으로 하며, 형제 참조(keyRef/tokenRef)를 작성해요. - Auth-profile 참조는 런타임 확인(resolution) 및 감사(audit) 범위에 포함돼요.
- OAuth 정책 가드:
auth.profiles.<id>.mode = "oauth"설정은 해당 프로필의 SecretRef 입력과 함께 사용할 수 없어요. 이 정책을 위반하면 시작/재로드 및 Auth-profile 확인 단계에서 즉시 실패해요. - SecretRef로 관리되는 모델 프로바이더의 경우, 생성된
agents/*/agent/models.json항목은apiKey/header 영역에 실제 비밀 값이 아닌 비밀이 아님을 나타내는 마커(non-secret markers)를 유지해요. - 마커 유지 방식은 소스 권한을 따라가요. OpenClaw는 확인된 런타임 비밀 값이 아니라, 활성화된 소스 설정 스냅샷(확인 전 단계)에서 마커를 작성해요.
- 웹 검색(web search)의 경우:
- 명시적 프로바이더 모드(
tools.web.search.provider설정됨)에서는 선택된 프로바이더 키만 활성화돼요. - 자동 모드(
tools.web.search.provider설정 안 됨)에서는 우선순위에 따라 확인되는 첫 번째 프로바이더 키만 활성화돼요. - 자동 모드에서 선택되지 않은 프로바이더 참조는 선택되기 전까지 비활성 상태로 취급돼요.
- 기존의
tools.web.search.*프로바이더 경로는 호환성 유지 기간 동안 여전히 확인되지만, 표준 SecretRef 영역은plugins.entries.<plugin>.config.webSearch.*예요.
- 명시적 프로바이더 모드(
지원되지 않는 자격 증명 (Unsupported credentials)
섹션 제목: “지원되지 않는 자격 증명 (Unsupported credentials)”범위 외 자격 증명은 다음과 같아요.
commands.ownerDisplaySecrethooks.tokenhooks.gmail.pushTokenhooks.mappings[].sessionKeyauth-profiles.oauth.*channels.discord.threadBindings.webhookTokenchannels.discord.accounts.*.threadBindings.webhookTokenchannels.whatsapp.creds.jsonchannels.whatsapp.accounts.*.creds.json
제외 이유:
- 이 자격 증명들은 시스템에서 생성되거나, 순환되거나, 세션을 포함하거나, OAuth 지속성을 가지는 클래스들이에요. 따라서 읽기 전용인 외부 SecretRef 확인 방식에는 적합하지 않아요.
도움이 필요하신가요? AI Setup Assistant에게 물어보세요.
다음 단계
섹션 제목: “다음 단계”OpenClaw Expert
아직 막혀 있나요?
이 문서에서 답을 못 찾았다면 OpenClaw Expert에게 바로 물어보세요.