Community생산성 & 협업github.com

mapbox/mapbox-token-security

Mapbox 접근 토큰의 보안 모범 사례 - 범위 관리, URL 제한, 교체 전략, 민감 데이터 보호 등 토큰 생성, 관리 및 보안 조언에 사용합니다.

mapbox-token-security란 무엇인가요?

이 스킬은 Mapbox 접근 토큰 보안에 관한 종합적인 가이드를 제공합니다. 개발자가 Mapbox API를 사용할 때 토큰 누출, 무단 사용, 권한 과다 부여 등의 위험을 방지하는 데 도움을 줍니다. 토큰 스코프(범위)를 세부적으로 제어하여 최소 권한 원칙을 적용하고, 특정 URL이나 IP에서만 토큰을 사용할 수 있도록 제한하는 방법을 설명합니다. 또한 토큰 주기적 교체 전략과 함께, 공개 저장소나 클라이언트 측 코드에 토큰이 노출되지 않도록 보호하는 실용적인 조치를 다룹니다. 이 스킬은 Mapbox GL JS, Maps SDK, Navigation SDK 등 다양한 Mapbox 플랫폼에서 일관되게 적용 가능한 보안 원칙을 제시합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mapbox/mapbox-agent-skills/tree/main/skills/mapbox-token-security

Installed? Explore more 생산성 & 협업 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

mapbox-token-security은(는) 무엇을 하나요?

Mapbox 접근 토큰의 보안 모범 사례 - 범위 관리, URL 제한, 교체 전략, 민감 데이터 보호 등 토큰 생성, 관리 및 보안 조언에 사용합니다.

개요

Mapbox 접근 토큰은 API와 SDK에 인증된 접근을 제공합니다. 부적절하게 보호되면 토큰이 도난당하거나 남용되어 비용 초래, 서비스 중단, 데이터 유출로 이어질 수 있습니다. 이 문서는 Mapbox 토큰 사용 시 따라야 할 핵심 보안 원칙을 다룹니다.

주요 보안 원칙

1. 최소 권한 원칙

  • 각 토큰에는 필요한 최소한의 권한(스코프)만 부여하십시오.
  • tokens:list, styles:read, styles:write 등 필요한 스코프만 선택하십시오.
  • 사용하지 않는 스코프는 절대 포함하지 마십시오.

2. URL 제한

  • 토큰을 특정 URL 패턴으로 제한하여 무단 도메인에서의 사용을 방지하십시오.
  • URL 제한은 와일드카드(*)를 지원합니다.
    • 예: https://myapp.example.com/*
    • 예: https://*.example.com/*

3. 정기적인 토큰 교체

  • 보안 위험을 최소화하기 위해 정기적으로 토큰을 교체하십시오.
  • 교체 주기: 민감한 환경에서는 90일마다, 그 외에는 1년마다 권장합니다.
  • 토큰 교체 시 이전 토큰은 즉시 비활성화하십시오.

4. 비공개 유지

  • 토큰을 소스 코드, 버전 관리 시스템, 공개 저장소에 절대 하드코딩하지 마십시오.
  • 환경 변수나 안전한 비밀 관리 서비스를 사용하십시오.
  • 클라이언트 측 코드에서는 공개(제한된) 토큰만 사용하십시오.

지원 플랫폼

  • Mapbox GL JS (제한된 URL 사용)
  • Maps SDK for Android/iOS (비공개 유지)
  • Navigation SDK (비공개 유지)
  • Mapbox API (서버 측에서 안전하게 사용)

토큰 생성 보안

Mapbox 계정 대시보드에서 토큰을 생성할 때:

  1. 토큰 이름을 명확하게 지정하여 용도를 식별할 수 있게 하십시오.
  2. 공개 토큰과 비공개 토큰을 구분하여 사용하십시오.
    • 공개 토큰: 프런트엔드 웹 SDK 사용 (URL 제한 필수)
    • 비공개 토큰: 서버 측 API 호출 (IP 제한 가능)
  3. IP 제한을 설정하여 특정 IP 주소에서만 토큰을 사용할 수 있게 하십시오.

위험 완화 전략

위험완화 전략
토큰 도난URL/IP 제한, 정기적 교체, 비공개 유지
권한 과다최소 권한 스코프만 부여
소스 코드 노출gitignore, 환경 변수, CI/CD 비밀 관리
재생 공격짧은 유효 기간, 토큰 폐기 절차

명령어 예시

# 토큰을 안전하게 환경 변수로 설정
export MAPBOX_ACCESS_TOKEN='your-token-here'

# Node.js에서 토큰 사용 (process.env)
const mapboxToken = process.env.MAPBOX_ACCESS_TOKEN;

참고 사항

  • 토큰이 유출되었다고 의심되면 즉시 Mapbox 계정에서 해당 토큰을 비활성화하고 새 토큰을 생성하십시오.
  • 공개 저장소에 토큰을 실수로 커밋한 경우 git history에서 제거하고 토큰을 폐기하십시오.
  • Mapbox 문서: Access Tokens

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

mapbox/mapbox-cartography

Expert guidance on map design principles, color theory, visual hierarchy, typography, and cartographic best practices for creating effective and beautiful maps with Mapbox. Use when designing map styles, choosing colors, or making cartographic decisions.

mapbox/mapbox-data-visualization-patterns

Patterns for visualizing data on maps including choropleth maps, heat maps, 3D visualizations, data-driven styling, and animated data. Covers layer types, color scales, and performance optimization.

mapbox/mapbox-geospatial-operations

Expert guidance on choosing the right geospatial tool based on problem type, accuracy requirements, and performance needs

mapbox/mapbox-search-integration

Complete workflow for implementing Mapbox search in applications - from discovery questions to production-ready integration with best practices

mapbox/mapbox-style-patterns

Common style patterns, layer configurations, and recipes for typical mapping scenarios including restaurant finders, real estate, data visualization, navigation, delivery/logistics, and more. Use when implementing specific map use cases or looking for proven style patterns.

mapbox/mapbox-style-quality

Expert guidance on validating, optimizing, and ensuring quality of Mapbox styles through validation, accessibility checks, and optimization. Use when preparing styles for production, debugging issues, or ensuring map quality standards.

mapbox/mapbox-web-integration-patterns

Official integration patterns for Mapbox GL JS across popular web frameworks (React, Vue, Svelte, Angular). Covers setup, lifecycle management, token handling, search integration, and common pitfalls. Based on Mapbox's create-web-app scaffolding tool.

mapbox/mapbox-web-performance-patterns

Performance optimization patterns for Mapbox GL JS web applications. Covers initialization waterfalls, bundle size, rendering performance, memory management, and web optimization. Prioritized by impact on user experience.

관련 스킬