
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
OmniAuth::Strategies::Ruesia is a simple Rack middleware for authorization in the russian Unified identification and authentication system(ЕСИА). Read the OmniAuth docs for detailed instructions: https://github.com/intridea/omniauth. The …/v2/ac resource is used as a technical solution for gathering authentication code and …/v3/te for JWT. In order to write client_secret, you need to send an http post request to any system that can work with data-hash signing algorithms using mechanisms of certified Russian
cryptographic means of information protection and a certificate
of the information system and return json response with signature
Request:
POST /api/sign { test: 'any string' }
Response:
{ signature: 'base64urlsafe signature' }
Add this line to your application's Gemfile:
gem "ruesia"
And then execute:
$ bundle
Or install it yourself as:
$ gem install ruesia
Here's a quick example, adding the middleware to a Rails app in config/initializers/ruesia.rb:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :ruesia, 'MY_SYSTEM',
scope: 'fullname email mobile id_doc'
cert_fingerprint: 'cert hex fingerprint'
csp_server_url: 'http://192.168.1.195:8080/api/sign'
client_options:
site: 'https://esia-portal1.test.gosuslugi.ru'
end
Guidelines for the use of the Unified Identification and Authentication System: https://digital.gov.ru/ru/documents/6186/
| option | comment |
|---|---|
| scope | requested access rights - paragraph B4 Table 95 |
| cert_fingerprint | parameter containing the hash of the certificate (fingerprint) of the client system in hex format. To generate it, use http://esia.gosuslugi.ru/public/calc_cert_hash_unix.zip |
| csp_server_url | url for cms server. We use Faradat to post request for /api/sign |
Add callback request to routes
get 'auth/:provider/callback', to: 'api/client/esia#create'
Contribution directions go here.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that omniauth-ruesia demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.