Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
warden.user
to persist your user in the session in the OAuth rails clients. It is no problem to use warden scopes here in the client.Alpha
, uses the Authorization Code Grant
to obtain an OAuth access_token
with the OAuth permission scope insider
.Bouncer
for the login. That's where the user is persisted into the session. And that's where a passport is created for the user. So basically, through the OAuth server cookie, the SSO session is tied together. As long as it is there, you are logged in (in that browser e.g.).iPhone
, uses the Resource Owner Password Credentials Grant
to exchange the username
and password
of the end user for an OAuth access_token
with the OAuth permission scope outsider
.access_token
for a passport token. That is effectively your API token used to communicate with the OAuth Rails clients.# Gemfile
gem 'sso', require: 'sso/client'
warden
gemSee the Warden wiki. However, one thing is special here, you must not store the entire object, but only a reference to the passport. If you store the entire object, that would be a major security risk and allow for cookie replay attacks.
class Warden::SessionSerializer
def serialize(passport)
Redis.set passport.id, passport.to_json
passport.id
end
def deserialize(passport_id)
json = Redis.get passport_id
SSO::Client::Passport.new JSON.parse(json)
end
end
OMNIAUTH_SSO_ENDPOINT="http://server.example.com"
Rails Example:
class SessionsController < ApplicationController
delegate :logout, to: :warden
def new
redirect_to '/auth/sso'
end
def create
warden.set_user auth_hash.info.to_hash
redirect_to root_path
end
def destroy
warden.logout
end
private
def auth_hash
request.env['omniauth.auth]
end
def warden
request.env['warden']
end
end
This is done by making use of Warden callbacks. See this piece of code.
# e.g. config/initializers/warden.rb
# The options are passed on to `::Warden::Manager.after_fetch`
SSO::Client::Warden::Hooks::AfterFetch.activate scope: :vip
``
#### Profit
FAQs
Unknown package
We found that sso 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.