Part of the KEY ecosystem · 12 projects
The Key module helps improve Drupal security by managing sensitive keys. It allows administrators to define where and how keys, such as API or encryption keys, are stored, offering options from configuration files to external key management solutions. This helps sites meet compliance requirements by securely handling sensitive information.
Key provides the ability to improve Drupal security by managing sensitive keys (such as API and encryption keys). It gives site administrators the ability to define how and where keys are stored, which allows the option of a high level of security and allows sites to meet regulatory or compliance requirements.
Examples of the types of keys that could be managed with Key are:
- An API key for connecting to an external service, such as PayPal, MailChimp, Authorize.net, UPS, an SMTP mail server, or Amazon Web Services
- A key used for encrypting data using the encrypt module
Managing keys
Key provides an administration page where users with the "administer keys" permission can add, edit, and delete keys.
By using key, administrators can choose to store their keys in the following locations:
- Configuration (development only): The Configuration key provider stores the key in Drupal’s database
- File (Better): The File key provider allows a key to be stored in a file, preferably outside of the webroot where it cannot be publicly accessed.
- Environment (Better): The Environment key provider allows a key to be stored in an environmental variable.
- External (Best): Use a key management solution external to Drupal. This allows your site to meet security best practices and compliance requirements.
A full list of modules that extend Key for various storage methods can be found here .
Generating a Random Encryption Key
An easy way to generate a random encryption key in a Unix environment is to enter the following command (changing the path and file name to suit your needs):
dd if=/dev/urandom bs=32 count=1 > /path/to/secret.key
This will create a binary file with a random 256-bit key. For a 128-bit key, change the 32 to 16 in the command.
Overriding Configuration
The Drupal 8 version of Key provides the ability to override any configuration value with a key. This allows site administrators to store configuration values in a more secure method than in the database or in settings.php.
Key configuration overrides can be created at /admin/config/development/configuration/key-overrides/add.
- Enter a name for the override
- Select the specific configuration item you wish to override
- Select an existing key that provides the value to be used; if the key doesn't exist, you'll need to create it
- Check "Clear overridden value" to clear any existing value for the overridden configuration item; this is important to make sure potentially sensitive data is removed from the configuration; if for some reason, you don't want to clear the value, uncheck this field
- Click "Save"
Ask your assistant about Key
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
118 tracked projects depend on this one
- Encrypt 38,264 sites
- AI (Artificial Intelligence) 25,742 sites
- Cloudflare Turnstile 9,055 sites
- Pantheon Secrets 6,141 sites
- amazee.ai Private AI Provider 5,962 sites
- Easy Encryption 5,049 sites
- TMGMT DeepL Integration 4,791 sites
- JSON Web Token Authentication (JWT) 4,236 sites
- Gemini Provider 2,111 sites
- Asymmetric (private/public) Keys 1,599 sites
- Content Sync (content-sync.io) 859 sites
- Apigee 799 sites
- AI Figma 716 sites
- ElevenLabs 710 sites
- Loqate (Address Capture) 454 sites
- Model Context Protocol 430 sites
- Azure Blob Storage File System 394 sites
- LTI Tool Provider 363 sites
- Backup and Migrate: AWS S3 353 sites
- Vault - AppRole Authentication 333 sites
- Twitter API (v2) Block 299 sites
- Cloudflare: Node Cache Clear 265 sites
- Drupal WhatsApp 217 sites
- Stripe API 201 sites
- Microsoft Graph API 185 sites
- Flickr Integration Suite 172 sites
- Deepseek Provider 159 sites
- Google Vertex Provider 143 sites
- OpenAI Compatible Provider 109 sites
- Augmentor AI 108 sites
- Qdrant VDB Provider 105 sites
- Lockr 92 sites
- DXPR AI Provider 68 sites
- Address Static Map 65 sites
- SQLite VDB Provider 63 sites
- Mediaflow 60 sites
- Cloudflare Purger 60 sites
- Acquia AI Provider 55 sites
- Encrypt KMS 54 sites
- AnythingLLM Provider 51 sites
- Redsys payment module 45 sites
- Pantheon Content Publisher 41 sites
- Symfony Mailer: MS Graph (App + Delegated) 37 sites
- Media Remote Social (oEmbed) 35 sites
- Azure Storage 33 sites
- Analyze Search Console 30 sites
- Braintree API 30 sites
- Acquia Key Provider 29 sites
- YandexGPT Provider 24 sites
- PHPMailer Azure OAuth2 23 sites
- X Ai Provider 21 sites
- IP Info 20 sites
- Opigno mobile application endpoints 17 sites
- BankID 14 sites
- Fuzzy Config Key Provider 13 sites
- Feeds FileMaker 12 sites
- Editoria11y SI (SiteImprove) 12 sites
- GraphQL Vertex AI 10 sites
- Freja eID for Drupal 10 sites
- JWT Authentication 9 sites
- Canvas API 8 sites
- Vault KV Integration 8 sites
- NoBotIQ Spam Protection 8 sites
- PCO - Planning Center Online API 7 sites
- Vault - KV Key Provider 7 sites
- Scribit Pro 6 sites
- Kameleoon 6 sites
- Metatag AI Generate 5 sites
- Workers AI Provider 5 sites
- Nasjonalt vitenarkiv (NVA) 4 sites
- Cision Integration 4 sites
- Webform JIRA service desk integration 4 sites
- Audit Chain 4 sites
- MCP Sentinel 4 sites
- Instagram Feed Block 3 sites
- Vault - Token Authentication 3 sites
- Analyze PostHog 3 sites
- DiscordPHP 3 sites
- CloudFront Private Files 3 sites
- RAG (Retrieval-Augmented Generation) Search 2 sites
- Greenhouse Job Board API 2 sites
- Event Log Track Encrypt 2 sites
- Community Guard - Jev/Laya Spam Detection and Moderation 2 sites
- Google Sheets Table 2 sites
- SAML 2 sites
- Quant Cloud AI Provider 2 sites
- Solr VDB Provider 2 sites
- AI Provider moonshot (Kimi) 1 sites
- AI Provider zhipuai 1 sites
- Social Summaries 1 sites
- AIDmi - AI, describe my image! - CKEditor image plugin for 508 alt text and caption 1 sites
- PillarShield 1 sites
- Comment Moderation AI 1 sites
- TMGMT ModernMT 1 sites
- AI Provider Baidu 1 sites
- AI Provider SiliconFlow 1 sites
- API plugins 1 sites
- TMGMT Tolgee Translator 1 sites
- CDNetworks Purge 1 sites
- Weaviate VDB Provider 1 sites
- GTFS 511 1 sites
- Page Refresh Webhook
- Webform Monday.com
- Virtuous CRM
- Apex AI Orchestration
- RaiseDonors
- DID Ai Provider
- AI Natural Language Test
- Vault - AWS Dynamic Key Provider
- Vault - Transit Encryption
- Hashicorp Vault Secrets Key Integration
- Media accessibility enhancer
- ATLS
- Channel Publisher
- StackIT Provider
- FlowSpeech
- Twenty CRM integration
- LiipGPT
More in the KEY ecosystem
Most installed first
Activity
Release Timeline
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 8.x-1.23 | Stable | 10–11 | Nov 3, 2026 | ||
| 2.0.0-alpha1 | Pre-release | 9–11 | Mar 20, 2026 | ||
| 8.x-1.22 | Stable | 9–11 | Jan 20, 2026 | ||
| 8.x-1.21 | Stable | 9–11 | Dec 18, 2025 | ||
| 2.0.x-dev | Dev | 9–11 | May 29, 2025 | ||
| 8.x-1.20 | Stable | 8–11 | Apr 13, 2025 | ||
| 8.x-1.19 | Stable | 8–11 | Jul 4, 2024 | ||
| 8.x-1.18 | Stable | 8–11 | Jun 3, 2024 | ||
| 8.x-1.17 | Stable | 8–10 | Jan 21, 2023 |