# 보안 및 인증 (Go) > JWT, OAuth2, 세션 관리, RBAC, crypto/rand vs math/rand, TLS 설정, 안전한 코딩, 보안 모범 사례 - 24 면접 질문 - Senior - [면접 질문: Go](https://sharpskill.dev/ko/technologies/go/interview-questions.md) ## 1. JWT 토큰과 전통적인 서버 세션의 주요 차이점은 무엇입니까? **답변** JWT 토큰은 상태 비저장(서버 측 상태 없음) 방식이며 필요한 모든 정보가 토큰 자체에 인코딩되어 포함됩니다. 데이터를 서버 측의 메모리나 데이터베이스에 저장하고 클라이언트 측에는 session ID만 두는 전통적인 세션과 달리, JWT는 저장 책임을 클라이언트로 옮깁니다. 서버 간에 공유 상태가 필요하지 않으므로 수평 확장이 용이해집니다. ## 2. 점으로 구분된 JWT 토큰의 세 부분은 무엇입니까? **답변** JWT는 Base64URL로 인코딩되고 점으로 구분된 세 부분으로 구성됩니다. Header(알고리즘 및 타입), Payload(claims/데이터), Signature(무결성 검증)입니다. 구조는 header.payload.signature입니다. header는 서명 알고리즘(HS256, RS256)을 나타내고, payload는 claims(iss, sub, exp)를 포함하며, signature는 토큰이 변조되지 않았음을 보장합니다. ## 3. 토큰 만료 타임스탬프를 정의하는 표준 JWT claim은 무엇입니까? **답변** 'exp'(expiration time) claim은 그 이후로 토큰을 더 이상 받아들이지 말아야 하는 Unix 타임스탬프를 정의합니다. 표준 claims에는 'iss'(issuer), 'sub'(subject), 'aud'(audience), 'iat'(issued at), 'nbf'(not before)도 포함됩니다. exp claim 검증은 토큰의 유효 기간을 제한하고 탈취된 토큰의 영향을 줄이는 데 매우 중요합니다. ## 21개 추가 질문 이용 가능 - JWT에 서명할 때 HS256과 RS256의 주요 차이점은 무엇입니까? - JWT를 자연 만료 전에 어떻게 취소합니까? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 Go 면접 주제 - [Go 기초](https://sharpskill.dev/ko/technologies/go/interview-questions/go-basics.md): 25개 질문, Junior - [Go 데이터 구조](https://sharpskill.dev/ko/technologies/go/interview-questions/go-data-structures.md): 20개 질문, Junior - [Go 인터페이스](https://sharpskill.dev/ko/technologies/go/interview-questions/go-interfaces.md): 18개 질문, Junior - [에러 처리](https://sharpskill.dev/ko/technologies/go/interview-questions/error-handling.md): 20개 질문, Junior - [Goroutine 기초](https://sharpskill.dev/ko/technologies/go/interview-questions/goroutines-basics.md): 20개 질문, Junior - [Channels](https://sharpskill.dev/ko/technologies/go/interview-questions/channels.md): 22개 질문, Junior - [Go Modules](https://sharpskill.dev/ko/technologies/go/interview-questions/go-modules.md): 18개 질문, Mid-Level - [HTTP 서버](https://sharpskill.dev/ko/technologies/go/interview-questions/http-server.md): 24개 질문, Mid-Level - [HTTP 클라이언트](https://sharpskill.dev/ko/technologies/go/interview-questions/http-client.md): 18개 질문, Mid-Level - [JSON 인코딩](https://sharpskill.dev/ko/technologies/go/interview-questions/json-encoding.md): 20개 질문, Mid-Level - [Database/SQL](https://sharpskill.dev/ko/technologies/go/interview-questions/database-sql.md): 22개 질문, Mid-Level - [context 패키지](https://sharpskill.dev/ko/technologies/go/interview-questions/context-package.md): 20개 질문, Mid-Level - [Testing](https://sharpskill.dev/ko/technologies/go/interview-questions/testing.md): 22개 질문, Mid-Level - [동시성 패턴](https://sharpskill.dev/ko/technologies/go/interview-questions/concurrency-patterns.md): 24개 질문, Mid-Level - [동기화 프리미티브](https://sharpskill.dev/ko/technologies/go/interview-questions/sync-primitives.md): 22개 질문, Mid-Level - [Go 웹 프레임워크](https://sharpskill.dev/ko/technologies/go/interview-questions/go-web-frameworks.md): 20개 질문, Mid-Level - [REST API 설계](https://sharpskill.dev/ko/technologies/go/interview-questions/rest-api-design.md): 20개 질문, Mid-Level - [gRPC](https://sharpskill.dev/ko/technologies/go/interview-questions/grpc.md): 22개 질문, Mid-Level - [Reflection](https://sharpskill.dev/ko/technologies/go/interview-questions/reflection.md): 20개 질문, Senior - [메모리 관리](https://sharpskill.dev/ko/technologies/go/interview-questions/memory-management.md): 24개 질문, Senior - [성능 최적화](https://sharpskill.dev/ko/technologies/go/interview-questions/performance-optimization.md): 22개 질문, Senior - [Generics](https://sharpskill.dev/ko/technologies/go/interview-questions/generics.md): 20개 질문, Senior - [Go Design Patterns](https://sharpskill.dev/ko/technologies/go/interview-questions/design-patterns.md): 24개 질문, Senior - [Microservices](https://sharpskill.dev/ko/technologies/go/interview-questions/microservices.md): 24개 질문, Senior - [Docker & Containerization](https://sharpskill.dev/ko/technologies/go/interview-questions/docker-containerization.md): 20개 질문, Senior - [Kubernetes Basics](https://sharpskill.dev/ko/technologies/go/interview-questions/kubernetes-basics.md): 22개 질문, Senior - [고급 Go](https://sharpskill.dev/ko/technologies/go/interview-questions/advanced-go.md): 20개 질문, Senior - [CLI 개발](https://sharpskill.dev/ko/technologies/go/interview-questions/cli-development.md): 20개 질문, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ko/technologies/go/interview-questions/security-authentication