Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ESIA (esia.gosuslugi.ru) API draft #1014

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

LMSBoris
Copy link

@LMSBoris LMSBoris commented Jul 1, 2021

Added ESIA (esia.gosuslugi.ru) API draft.

Currently only getting authorization code and trading it for access token (with OpenID JWT token) is implemented. Implementation can be tested using EsiaExample.

To access ESIA OAuth API, your client should be registered and approved by authorities as described in https://digital.gov.ru/ru/documents/4244. Also you should upload a valid X.509 certificate with GOST 2012 algorithm to your client's account in sandbox (and then production) ESIA tech portal. This certificate will be used by ESIA to authenticate your requests (ESIA uses its own client authentication scheme described in https://digital.gov.ru/ru/documents/6186). Sandbox environment allows use of self-signed certificates.

Signing requests with GOST 2012 algorithm is implemented using BouncyCastle 1.65 opensource crуptoprovider (and you may build your own implementation). Prior BC versions fail reading tricky private keys created by CryptoPro tool. To use provided implementation you should have both certificate and private key in PEM format (not in single file as BC cannot read it).

@LMSBoris LMSBoris marked this pull request as draft July 1, 2021 16:30
@LMSBoris LMSBoris force-pushed the Esia branch 2 times, most recently from 3d1c9c0 to c1b3eee Compare July 5, 2021 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant