OAuthとは

What is OAuth?

OAuth explained
OAuth is a technological standard that allows you to authorize one app or service to sign in to another without divulging private information, such as passwords. If you’ve ever received a message such as, “Sign in with Facebook?” or “Allow this application to access your account?” you’ve seen OAuth in action.

パスワードなどの個人情報を漏らすことなく、あるアプリやサービスに別のアプリやサービスにサインインすることを許可する技術標準

OAuth1.0 と 2.0 の違い

OAuth 2.0 における主要コンポーネント

  • ユーザー(Resource Owner)
    • リソースの所有者
  • 認可サーバー(Authorization Server)
    • アクセストークンを発行するサーバー
  • リソースサーバー(Resource Server)
    • リソースを管理するサーバーの Web API
  • クライアント(Client)
    • リソースサーバーを利用するアプリケーション

例: CodeBuild と GitHub OAuth App

OAuth の仕組みにより、CodeBuild は GitHub アカウント(開発者)のパスワード情報なしに GitHubリポジトリからソースコードを取得できる

  • ユーザー(Resource Owner)
    • 開発者(GitHubアカウント所有者)
    • 所有リソース: GitHubリポジトリ、ソースコード
  • 認可サーバー(Authorization Server)
    • GitHub の OAuth サービス
  • リソースサーバー(Resource Server)
    • GitHub API サーバー
  • クライアント(Client)
    • AWS CodeBuild
    • GitHubリポジトリにアクセスしてソースコードを取得