Part of the KEY ecosystem · 10 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
114 tracked projects depend on this one
- Encrypt 39,881 sites
- AI (Artificial Intelligence) 23,475 sites
- amazee.ai Private AI Provider 8,283 sites
- Cloudflare Turnstile 7,704 sites
- Easy Encryption 7,334 sites
- Pantheon Secrets 6,911 sites
- TMGMT DeepL Integration 4,300 sites
- JSON Web Token Authentication (JWT) 4,251 sites
- Asymmetric (private/public) Keys 1,525 sites
- Gemini Provider 1,493 sites
- Apigee 854 sites
- Loqate (Address Capture) 474 sites
- Model Context Protocol 402 sites
- Azure Blob Storage File System 391 sites
- Backup and Migrate: AWS S3 391 sites
- AI Figma 372 sites
- LTI Tool Provider 350 sites
- Vault - AppRole Authentication 302 sites
- Twitter API (v2) Block 300 sites
- Cloudflare: Node Cache Clear 272 sites
- Drupal WhatsApp 210 sites
- Deepseek Provider 175 sites
- Stripe API 159 sites
- Flickr Integration Suite 159 sites
- Microsoft Graph API 159 sites
- OpenAI Compatible Provider 150 sites
- Augmentor AI 135 sites
- ElevenLabs 111 sites
- Scribit Pro 106 sites
- Acquia AI Provider 105 sites
- Google Vertex Provider 93 sites
- Lockr 84 sites
- Address Static Map 76 sites
- Encrypt KMS 63 sites
- Mediaflow 61 sites
- SQLite VDB Provider 60 sites
- Qdrant VDB Provider 56 sites
- Pantheon Content Publisher 55 sites
- DXPR AI Provider 53 sites
- AnythingLLM Provider 50 sites
- Media Remote Social (oEmbed) 47 sites
- Redsys payment module 43 sites
- Cloudflare Purger 40 sites
- Azure Storage 34 sites
- Braintree API 32 sites
- X Ai Provider 28 sites
- Acquia Key Provider 26 sites
- Analyze Search Console 25 sites
- AI Provider moonshot (Kimi) 20 sites
- Symfony Mailer: MS Graph (App + Delegated) 20 sites
- MCP Sentinel 20 sites
- Opigno mobile application endpoints 18 sites
- IP Info 17 sites
- YandexGPT Provider 15 sites
- Feeds FileMaker 15 sites
- Audit Chain 14 sites
- GTFS 511 11 sites
- Freja eID for Drupal 11 sites
- Nasjonalt vitenarkiv (NVA) 10 sites
- PHPMailer Azure OAuth2 10 sites
- Webform JIRA service desk integration 9 sites
- JWT Authentication 8 sites
- BankID 8 sites
- Vault - KV Key Provider 8 sites
- Canvas API 8 sites
- Fuzzy Config Key Provider 7 sites
- Metatag AI Generate 6 sites
- PCO - Planning Center Online API 6 sites
- Workers AI Provider 6 sites
- CloudFront Private Files 6 sites
- RAG (Retrieval-Augmented Generation) Search 5 sites
- GraphQL Vertex AI 5 sites
- Kameleoon 5 sites
- NoBotIQ Spam Protection 4 sites
- Cision Integration 4 sites
- Editoria11y SI (SiteImprove) 4 sites
- Social Summaries 3 sites
- API plugins 3 sites
- Vault KV Integration 3 sites
- Vault - Token Authentication 3 sites
- DiscordPHP 3 sites
- Google Sheets Table 3 sites
- Instagram Feed Block 2 sites
- TMGMT ModernMT 2 sites
- Greenhouse Job Board API 2 sites
- Analyze PostHog 2 sites
- Community Guard - Jev/Laya Spam Detection and Moderation 2 sites
- ATLS 2 sites
- Quant Cloud AI Provider 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
- AI Provider Baidu 1 sites
- Hashicorp Vault Secrets Key Integration 1 sites
- Event Log Track Encrypt 1 sites
- CDNetworks Purge 1 sites
- Page Refresh Webhook
- FlowSpeech
- Webform Monday.com
- AI Provider zhipuai
- Virtuous CRM
- Apex AI Orchestration
- RaiseDonors
- Twenty CRM integration
- AI Provider SiliconFlow
- 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
More in the KEY ecosystem
Most installed first
Activity
Release Timeline
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 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 |