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 41,215 sites
- AI (Artificial Intelligence) 21,539 sites
- Cloudflare Turnstile 9,143 sites
- Pantheon Secrets 6,160 sites
- amazee.ai Private AI Provider 6,017 sites
- Easy Encryption 5,200 sites
- TMGMT DeepL Integration 4,553 sites
- JSON Web Token Authentication (JWT) 4,380 sites
- Gemini Provider 1,730 sites
- Content Sync (content-sync.io) 1,475 sites
- Asymmetric (private/public) Keys 1,474 sites
- Apigee 935 sites
- AI Figma 616 sites
- ElevenLabs 570 sites
- Loqate (Address Capture) 471 sites
- Model Context Protocol 437 sites
- Azure Blob Storage File System 403 sites
- Backup and Migrate: AWS S3 394 sites
- LTI Tool Provider 344 sites
- Vault - AppRole Authentication 320 sites
- Twitter API (v2) Block 288 sites
- Cloudflare: Node Cache Clear 280 sites
- Drupal WhatsApp 216 sites
- Microsoft Graph API 191 sites
- Deepseek Provider 159 sites
- Stripe API 148 sites
- Google Vertex Provider 135 sites
- OpenAI Compatible Provider 129 sites
- Augmentor AI 106 sites
- Qdrant VDB Provider 100 sites
- Flickr Integration Suite 96 sites
- Lockr 88 sites
- DXPR AI Provider 85 sites
- Mediaflow 82 sites
- Address Static Map 74 sites
- SQLite VDB Provider 71 sites
- Encrypt KMS 60 sites
- Acquia AI Provider 52 sites
- AnythingLLM Provider 51 sites
- Cloudflare Purger 50 sites
- Redsys payment module 44 sites
- Media Remote Social (oEmbed) 42 sites
- Pantheon Content Publisher 40 sites
- Symfony Mailer: MS Graph (App + Delegated) 34 sites
- Acquia Key Provider 28 sites
- Braintree API 28 sites
- PHPMailer Azure OAuth2 27 sites
- Azure Storage 25 sites
- X Ai Provider 25 sites
- Scribit Pro 23 sites
- Analyze Search Console 23 sites
- IP Info 20 sites
- Opigno mobile application endpoints 19 sites
- Fuzzy Config Key Provider 16 sites
- BankID 15 sites
- Editoria11y SI (SiteImprove) 12 sites
- YandexGPT Provider 11 sites
- Feeds FileMaker 11 sites
- Vault - KV Key Provider 10 sites
- Freja eID for Drupal 9 sites
- Kameleoon 7 sites
- Canvas API 7 sites
- Vault KV Integration 7 sites
- GraphQL Vertex AI 6 sites
- Metatag AI Generate 6 sites
- Workers AI Provider 6 sites
- Vault - Token Authentication 6 sites
- GTFS 511 6 sites
- Nasjonalt vitenarkiv (NVA) 5 sites
- JWT Authentication 5 sites
- Webform JIRA service desk integration 5 sites
- NoBotIQ Spam Protection 5 sites
- RAG (Retrieval-Augmented Generation) Search 4 sites
- PCO - Planning Center Online API 4 sites
- Cision Integration 4 sites
- Greenhouse Job Board API 3 sites
- Analyze PostHog 3 sites
- DiscordPHP 3 sites
- CloudFront Private Files 3 sites
- ATLS 3 sites
- AI Provider moonshot (Kimi) 2 sites
- Instagram Feed Block 2 sites
- Event Log Track Encrypt 2 sites
- Community Guard - Jev/Laya Spam Detection and Moderation 2 sites
- CDNetworks Purge 2 sites
- Google Sheets Table 2 sites
- Audit Chain 2 sites
- AI Provider zhipuai 1 sites
- Social Summaries 1 sites
- PillarShield 1 sites
- TMGMT ModernMT 1 sites
- AI Provider Baidu 1 sites
- AI Provider SiliconFlow 1 sites
- API plugins 1 sites
- Hashicorp Vault Secrets Key Integration 1 sites
- SAML 1 sites
- MCP Sentinel 1 sites
- Page Refresh Webhook
- Webform Monday.com
- AIDmi - AI, describe my image! - CKEditor image plugin for 508 alt text and caption
- Virtuous CRM
- Apex AI Orchestration
- Comment Moderation AI
- RaiseDonors
- DID Ai Provider
- AI Natural Language Test
- TMGMT Tolgee Translator
- Vault - AWS Dynamic Key Provider
- Vault - Transit Encryption
- Media accessibility enhancer
- LiipGPT
- Channel Publisher
- Weaviate VDB Provider
- StackIT Provider
- FlowSpeech
- Quant Cloud AI Provider
- Solr VDB Provider
- Twenty CRM integration
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 |