jwtに関するtanalab2のブックマーク (11)

  • An Introduction to Using JWT Authentication in Rails — SitePoint

    April 28, 2016An Introduction to Using JWT Authentication in Rails With the advent of Single Page Applications (SPA) and mobile applications, APIs have come to the forefront of web development. As we develop APIs to support our SPA and mobile apps, securing the APIs has been a major pain area. Token-based authentication is one of the most-favored authentication mechanisms, but tokens are prone to

    An Introduction to Using JWT Authentication in Rails — SitePoint
    tanalab2
    tanalab2 2017/11/08
  • 213526#JSON-Web-Token-JWT-%E3%81%B8%E3%81%AE%E5%AF%BE%E5%BF%9C

    はじめに 今回追加した API API を追加した目的 最終的に作った API の仕様 使い方 API トークンの発行 エクスポータの設定 エクスポータの実行 JSON Web Token (JWT) への対応 JWT とは? JWT を操作するための gem Rails アプリに組み込む - トークンの発行 Rails アプリに組み込む - トークンの検証 Cross-Origin Resource Sharing (CORS) への対応 CORS とは? CORS に対応するための rack-cors gem rack-cors の注意点 まとめ はじめに https://www.admiral-stats.com/ という URL で、Ruby on Rails 5 で作った Admiral Stats というサービスを動かしています。このサービス自体については、過去の記事 を参照く

    213526#JSON-Web-Token-JWT-%E3%81%B8%E3%81%AE%E5%AF%BE%E5%BF%9C
    tanalab2
    tanalab2 2017/11/08
  • Invalidating JSON Web Tokens

    For a new node.js project I'm working on, I'm thinking about switching over from a cookie based session approach (by this, I mean, storing an id to a key-value store containing user sessions in a user's browser) to a token-based session approach (no key-value store) using JSON Web Tokens (jwt). The project is a game that utilizes socket.io - having a token-based session would be useful in such a s

    Invalidating JSON Web Tokens
    tanalab2
    tanalab2 2017/11/08
  • HMAC - Wikipedia

    HMAC-SHA1の生成 HMAC (Hash-based Message Authentication Code または keyed-Hash Message Authentication Code) とは、メッセージ認証符号 (MAC; Message Authentication Code) の一つであり、秘密鍵とメッセージ(データ)とハッシュ関数をもとに計算される。 1997年2月、IBMのKrawczykらにより提唱され、RFC 2104として公開されている。また、FIPS PUB 198にも採用されている。 MACは認証及び改竄検出技術の核となるアルゴリズムである。HMACアルゴリズムは、MAC値(タグ)の算出に暗号学的ハッシュ関数を用いる。ハッシュ関数としては、SHA-2やSHA-3など任意の繰返し型ハッシュ関数を適用可能であり、ハッシュ関数Xを用いるHMACは、HMAC-X

    HMAC - Wikipedia
  • JWT.IO

    JSON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties. JWT.IO allows you to decode, verify and generate JWT. Learn more about jwtSee jwt libraries Warning: JWTs are credentials, which can grant access to resources. Be careful where you paste them! We do not record tokens, all validation and debugging is done on the client side.

    JWT.IO
    tanalab2
    tanalab2 2017/11/07
  • Django REST framework JWT

    REST framework JWT Auth JSON Web Token Authentication support for Django REST Framework Overview This package provides JSON Web Token Authentication support for Django REST framework. If you want to know more about JWT, check out the following resources: DjangoCon 2014 - JSON Web Tokens Video | Slides Auth with JSON Web Tokens JWT.io Requirements Python (2.7, 3.3, 3.4, 3.5) Django (1.8, 1.9, 1.10)

    tanalab2
    tanalab2 2017/11/07
  • What Are Refresh Tokens and How to Use Them Securely

    This post will explore the concept of refresh tokens as defined by OAuth 2.0. We will learn how they compare to other token types and how they let us balance security, usability, and privacy. You can follow the text in this post, or if you prefer learning from presentations, you can watch this article’s companion video: What Is A Token?Tokens are pieces of data that carry just enough information t

    What Are Refresh Tokens and How to Use Them Securely
  • JWTを認証用トークンに使う時に調べたこと - Carpe Diem

    概要 JWTを認証用トークンに使う時に調べたことをまとめます。 JWTとは JWTはJWSやJWEの構造の中にエンコードして埋め込まれるJSON形式のclaimのセットです。 一般的にはJWS形式のJWTが使われるのでそれを前提に進めます。 JWS形式のJWTは以下のフォーマットです。 {base64エンコードしたheader}.{base64エンコードしたclaims}.{署名} 以下の特徴があります。 発行者が鍵を使ってJSONを署名(or HMAC)し、トークンとして扱う。 暗号化ではないので、JSON の中身は誰でも見られる。 発行者は鍵を使ってメッセージの検証ができるので、改竄を検知できる。 以上の点からトークンとして向いているため、認証トークンとして用いられるようになってきました。 Cookieとの認証フロー比較 ref: Cookies vs Tokens. Getting

    JWTを認証用トークンに使う時に調べたこと - Carpe Diem
    tanalab2
    tanalab2 2017/11/07
  • JWT Auth in Rails, From Scratch

    09 Jun 2016 on ember | rails api | auth | ember simple auth | jwt | knock JWT Auth in Rails, From Scratch In an earlier post, we took a look at JWT authentication in Rails, and implemented a JWT authentication system using the Knock gem. Here, we'll drop down a level and re-build our JWT authentication system from scratch, without the help of the Knock gem. You can check out the code for this post

    JWT Auth in Rails, From Scratch
  • JWT - Plugin | Kong Docs

    Lightweight, fast, and flexible cloud-native API gateway

    JWT - Plugin | Kong Docs
    tanalab2
    tanalab2 2017/11/07
  • RS256 と HS256 ってなにが違うの - Qiita

    どちらの選択肢も、IDプロバイダがJWTに署名する(sign)ために使用するアルゴリズムです。ここで「署名する」とは、トークンの受信者が、トークンが改ざんされていないことを検証できる「署名(signature)」(JWTの一部)を生成する暗号操作です。 RS256は非対称アルゴリズムであり、公開鍵/秘密鍵のペアを使用します。IDプロバイダは署名を生成するために使用される秘密鍵を持ち、JWTのコンシューマは署名を検証するための公開鍵を取得します。秘密鍵とは対照的に、公開鍵は保護されている必要がないため、ほとんどのIDプロバイダは、IDのコンシューマが(通常はメタデータURLを介して)入手して使用できるようにします。 一方、HS256は、対称アルゴリズムであり、2つの当事者間で共有される1つの(秘密)鍵のみを使用します。署名を生成して検証するために同じ鍵が使用されるので、鍵が侵害されていないこ

    RS256 と HS256 ってなにが違うの - Qiita
    tanalab2
    tanalab2 2017/11/07
  • 1