- 追加された行はこの色です。
- 削除された行はこの色です。
「[[マイクロソフト系技術情報 Wiki>http://techinfoofmicrosofttech.osscons.jp/]]」は、「[[Open棟梁Project>https://github.com/OpenTouryoProject/]]」,「[[OSSコンソーシアム .NET開発基盤部会>https://www.osscons.jp/dotNetDevelopmentInfrastructure/]]」によって運営されています。
-[[戻る>JWT]]
* 目次 [#u45db361]
#contents
*概要 [#rb87a68b]
jose-jwt使い倒し。
**特徴 [#o4d29f44]
Readme.md中で、以下の様に述べられている。
-.NETと[[.NET Core]]用の最小 or ゼロ依存のアルティメット[[JWT]]実装
-jose.4.j、Nimbus-JOSE-JWT、json-jwtライブラリとの互換性を広範にテスト。
**[[比較>JWT#r4ac23c8]] [#efad17e4]
-ライトユーザー向けではなく、ヘビーユーザー向け。
-サーバーサイド実装、クロスプラットフォーム実装。的な。
*詳細 [#jebc97ce]
**機能 [#v9a01dd1]
***[[JWS]] [#l00fa0a9]
署名・検証
***[[JWE]] [#pd6a0dcb]
暗号化・復号化
***ユーティリティ [#n2439696]
・・・
**依存関係 [#da102a96]
以下を使用している。
#ref(browser.png,left,nowrap,参照設定)
***[[CAPI(CSP)、CNG>.NETの署名・暗号化アルゴリズム#fde2f12c]] [#q7931d76]
-実装がある。
--https://github.com/dotnet/corefx/tree/master/src/System.Security.Cryptography.Csp/src/System/Security/Cryptography
--https://github.com/dotnet/corefx/tree/master/src/System.Security.Cryptography.Cng/src/System/Security/Cryptography
-Linuxで動作するか不明。
-以下の[[OpenSSL>#l3af4ef0]]を使用しているため問題無いと考える。
-Linuxで動作するか不明だが、以下の[[OpenSSL>#l3af4ef0]]を使用しているため問題無いと考える。~
恐らく内部的に(CAPI(CSP)、CNG、Managed(OpenSSL)?と)、切り替えているモノと思われる。
***OpenSSL [#l3af4ef0]
-上記の、AlgorithmとX509Certificateでは、更に下位にOpenSSLのNuGetライブラリを参照している。
--Algorithm~
https://github.com/dotnet/corefx/tree/master/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography
--X509Certificate~
https://github.com/dotnet/corefx/tree/master/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates
-プロバイダ~
以下のプロバイダがOpenSslベースのプロバイダとして提供されいている。~
https://github.com/dotnet/corefx/tree/master/src/System.Security.Cryptography.OpenSsl/src/System/Security/Cryptography
--RSAOpenSsl
--DSAOpenSsl
--ECDiffieHellmanOpenSsl
--ECDsaOpenSsl
-ネイティブ実装
--ライセンスには各種Linuxディストリビューション毎のネイティブ実装のライセンスが表示されるので、~
当該ライブラリのクロスプラットフォーム対応も完了しているものと考える。
#ref(license.png,left,nowrap,license)
--NuGetで検索すると以下のようなLinuxディストリビューション毎のネイティブ実装がある事を確認できる。~
https://www.nuget.org/packages?q=runtime.native.System.Security.Cryptography.OpenSsl
|#|>|runtime.native.System.Security.Cryptography.OpenSsl|
|1|runtime.debian.8-x64.runtime.native|.System.Security.Cryptography.OpenSsl|
|2|runtime.opensuse.42.1-x64.runtime.native|.System.Security.Cryptography.OpenSsl|
|3|runtime.rhel.7-x64.runtime.native|.System.Security.Cryptography.OpenSsl|
|4|runtime.fedora.24-x64.runtime.native|.System.Security.Cryptography.OpenSsl|
|5|runtime.opensuse.13.2-x64.runtime.native|.System.Security.Cryptography.OpenSsl|
|6|runtime.ubuntu.14.04-x64.runtime.native|.System.Security.Cryptography.OpenSsl|
|7|runtime.fedora.23-x64.runtime.native|.System.Security.Cryptography.OpenSsl|
|8|runtime.osx.10.10-x64.runtime.native|.System.Security.Cryptography.OpenSsl|
|9|runtime.ubuntu.16.04-x64.runtime.native|.System.Security.Cryptography.OpenSsl|
|10|runtime.ubuntu.16.10-x64.runtime.native|.System.Security.Cryptography.OpenSsl|
|11|runtime.opensuse.42.3-x64.runtime.native|.System.Security.Cryptography.OpenSsl|
|12|runtime.fedora.28-x64.runtime.native|.System.Security.Cryptography.OpenSsl|
|13|runtime.ubuntu.18.04-x64.runtime.native|.System.Security.Cryptography.OpenSsl|
|14|runtime.debian.9-x64.runtime.native|.System.Security.Cryptography.OpenSsl|
|15|runtime.fedora.27-x64.runtime.native|.System.Security.Cryptography.OpenSsl|
**サンプル・コード [#q8a19d35]
https://github.com/OpenTouryoProject/SampleProgram/blob/master/Other/jose_jwt_Sample/jose_jwt_Sample/Program.cs
**[[.NET Standard]], [[.NET Core]]との差異 [#b47b5b91]
***X509Certificate2 [#b79342fc]
*参考 [#jda0c6e9]
-NuGet Gallery | jose-jwt~
https://www.nuget.org/packages/jose-jwt/
-dvsekhvalnov/jose-jwt~
https://github.com/dvsekhvalnov/jose-jwt~
----
Tags: [[:IT国際標準]], [[:認証基盤]], [[:クレームベース認証]], [[:暗号化]]