
Product
Secure Your AI-Generated Code with Socket MCP
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
devise_active_directory_authenticatable
Advanced tools
Devise ActiveDirectory Authenticatable is a AD based authentication strategy for the Devise authentication framework.
If you are building applications for use within your organization which require authentication and you want to use AD, this plugin is for you.
Please note, this plugin is currently under heavy development.
These gems are dependencies of the gem:
Please Note
This will only work for Rails 3 applications.
In the Gemfile for your application:
gem "devise"
gem "devise_active_directory_authenticatable"
Run the rails generators for devise (please check the devise documents for further instructions)
rails generate devise:install
rails generate devise MODEL_NAME
Run the rails generator for devise_active_directory_authenticatable
rails generate devise_active_directory_authenticatable:install [options]
This will update the devise.rb initializer, and update your user model. There are some options you can pass to it:
Options:
[--user-model=USER_MODEL] # User Model to update
# Default: user
[--group-model=USER_MODEL] # Group Model to update
# Default: group
[--add-rescue] # Update Application Controller with resuce_from for DeviseActiveDirectoryAuthenticatable::ActiveDirectoryException
# Default: true
The rest of this documentation needs to be revised. To get going on this, run the installer which will add some configuration options to config/intializers/devise.rb
Update your user and group tables in the database with migrations. Check attributes that are set in config/initializers/devise.rb to see which ones you will have to add.
In your user model add:
devise :ad_user
In your group model add:
devise :ad_group
Please Note
This devise plugin has not been tested with DatabaseAuthenticatable enabled at the same time. This is meant as a drop in replacement for DatabaseAuthenticatable allowing for a semi single sign on approach.
The field that is used for logins is the first key that's configured in the config/devise.rb
file under config.authentication_keys
, which by default is email. For help changing this, please see the Railscast that goes through how to customize Devise.
In initializer config/initializers/devise.rb
:
ad_settigns
ad_attr_mapping
ad_username (default: :userPrincipalName)
ad_create_user (default: true)
ad_logger (default: true)
ad_update_users (default: true)
ad_update_groups (default: true)
ad_update_group_memberships (default: true) [unimplemented]
ad_update_user_memberships (default: true) [unimplemented]
ad_caching (default: true)
FAQs
Unknown package
We found that devise_active_directory_authenticatable 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.
Product
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.