Skip to main content

Securely Integrate Didit APIs with AWS Secrets Manager

Learn how to enhance the security of your Didit API integrations by leveraging AWS Secrets Manager for robust credential management. This guide covers best practices for storing, rotating, and accessing API keys, ensuring your.

Securely Integrate Didit APIs with AWS Secrets Manager

Contents

In this guide

Jump to the part you need.

Enhanced Security with AWS Secrets ManagerProtect sensitive Didit API keys by centralizing their storage and management within AWS Secrets Manager, significantly reducing the risk of exposure.

Automated Credential RotationImplement automated rotation policies for your API credentials using Secrets Manager, ensuring that your keys are regularly updated without manual intervention or service downtime.

Seamless Integration into CI/CD PipelinesIntegrate secure credential retrieval directly into your continuous integration and continuous deployment pipelines, allowing for secure deployment of applications utilizing Didit APIs.

Didit's Developer-First ApproachDidit's clean APIs and modular architecture are designed for easy and secure integration with services like AWS Secrets Manager, supporting robust identity verification workflows from ID Verification to AML Screening.

The Imperative of Secure API Credential Management

In today's digital landscape, securing API credentials is paramount, especially when dealing with sensitive identity verification data. Exposing API keys can lead to unauthorized access, data breaches, and severe compliance penalties. For businesses leveraging powerful identity verification platforms like Didit, protecting API keys is not just a best practice—it's a necessity. AWS Secrets Manager offers a robust solution for centralizing, managing, and securely rotating database credentials, API keys, and other secrets throughout their lifecycle. This integration ensures that your applications can access Didit's cutting-edge identity verification capabilities, such as ID Verification, Passive & Active Liveness, and AML Screening, without compromising security.

Traditional methods of hardcoding API keys or storing them in environment variables present significant security vulnerabilities. Developers might inadvertently commit these keys to version control systems or expose them in log files. AWS Secrets Manager mitigates these risks by providing a dedicated, secure service for secrets management. It allows you to store your Didit API keys encrypted and retrieve them programmatically, ensuring they are never directly exposed in your application code or configuration files. This approach aligns perfectly with Didit's developer-first philosophy, promoting secure and scalable integrations.

Setting Up AWS Secrets Manager for Didit API Keys

Integrating AWS Secrets Manager with your Didit API keys involves a few straightforward steps. First, you'll need an AWS account and a Didit API key. If you don't have a Didit API key yet, you can easily obtain one by registering for Didit's free tier. Once you have your API key, navigate to the AWS Secrets Manager console to create a new secret.

Step-by-Step Configuration:

  1. Create a New Secret: In the AWS Secrets Manager console, choose "Store a new secret." Select "Other type of secret" and enter your Didit API key as a plain text or key-value pair. A common practice is to use a key-value pair like {"DIDIT_API_KEY": "YOUR_SECRET_DIDIT_KEY"}.
  2. Configure Secret Name and Description: Give your secret a meaningful name, e.g., didit/api-key-production, and an optional description. This helps in identifying the secret later.
  3. Disable Automatic Rotation (Initially): For API keys that don't have built-in rotation mechanisms via a service, you might initially disable automatic rotation. However, Secrets Manager does support custom rotation functions using AWS Lambda, which is highly recommended for long-term security.
  4. Review and Store: Review your configuration and store the secret.

Once stored, your Didit API key is encrypted at rest and can only be accessed by authorized AWS IAM roles or users. This immediately elevates the security posture of your integration, making it much harder for unauthorized parties to gain access to your critical identity verification services.

Accessing Didit API Keys Programmatically with AWS SDK

The real power of AWS Secrets Manager comes from its programmatic access. Your applications, whether running on EC2 instances, AWS Lambda, or ECS containers, can retrieve secrets at runtime using the AWS SDKs. This ensures that the API key is never hardcoded and is only made available to the application when needed.

Example Code Snippet (Python):


import boto3
from botocore.exceptions import ClientError
import json

def get_didit_api_key(secret_name, region_name="us-east-1"):
    client = boto3.client("secretsmanager", region_name=region_name)
    try:
        get_secret_value_response = client.get_secret_value(SecretId=secret_name)
    except ClientError as e:
        raise e
    else:
        if "SecretString" in get_secret_value_response:
            secret = get_secret_value_response["SecretString"]
            return json.loads(secret)["DIDIT_API_KEY"]
        else:
            # For binary secrets, handle accordingly
            pass

# Usage example
# didit_api_key = get_didit_api_key("didit/api-key-production")
# print(f"Retrieved Didit API Key: {didit_api_key}")

This Python function demonstrates how to retrieve the DIDIT_API_KEY from Secrets Manager. The application would call this function at startup or when the key is needed, ensuring that the key is dynamically loaded and not statically present in the codebase. Combined with AWS IAM roles, you can grant specific permissions to your applications to only retrieve the necessary secrets, adhering to the principle of least privilege.

Automated Rotation and Compliance Benefits

While Didit's API keys are designed for long-term use, the ability to rotate credentials regularly is a cornerstone of robust security. AWS Secrets Manager offers automated rotation, which, for API keys, typically involves invoking a Lambda function. This function can be custom-built to interact with Didit's management API (if supported) to generate new keys, update Secrets Manager, and then deprecate old keys. This ensures that even if a key is compromised, its lifespan is limited, significantly reducing the attack surface.

Automated rotation is crucial for meeting various compliance standards, such as GDPR, CCPA, and industry-specific regulations. By integrating Didit with AWS Secrets Manager, organizations can demonstrate a strong commitment to data security and privacy. Didit's comprehensive suite of identity verification tools, including ID Verification (OCR, MRZ, barcodes), Passive & Active Liveness, 1:1 Face Match, and AML Screening & Monitoring, handles sensitive user data. Therefore, securing the access credentials to these services is not just good practice but a regulatory mandate in many jurisdictions.

How Didit Helps

Didit is the AI-native, developer-first identity platform, designed for seamless and secure integration into any application. Our modular architecture and clean APIs make it incredibly easy to integrate with advanced security services like AWS Secrets Manager. Didit offers a comprehensive suite of identity verification products, from ID Verification (supporting OCR, MRZ, and barcodes) and Passive & Active Liveness for fraud prevention, to 1:1 Face Match & Face Search for biometric security, and AML Screening & Monitoring for compliance. For specific needs like age verification, Didit's privacy-preserving Age Estimation product ensures compliance without compromising user data.

Didit's commitment to a developer-first experience means providing instant sandboxes and extensive public documentation, allowing your team to quickly and securely implement identity solutions. With Didit, you benefit from Core KYC, a pay-per-successful check model, and no setup fees, making advanced identity verification accessible and cost-effective. By combining Didit's powerful identity verification capabilities with the robust credential management of AWS Secrets Manager, you can build highly secure, compliant, and scalable applications that automate trust and orchestrate risk with confidence.

Ready to Get Started?

Ready to see Didit in action? Get a free demo today.

Start verifying identities for free with Didit's free tier.

Try it

Try this in the sandbox

Run the check this guide describes, free.

ID Verification

The product this post is about, taken from its topic. Run it free in the sandbox.

$0.15 per checkStart free

Author

Alejandro Rosas

Co-founder and CTO

Alejandro Rosas

Alejandro Rosas

Co-founder and CTO

About Didit

Questions

Blog questions

Who writes the Didit blog?
The Didit team. Guides reviewed by Alberto Rosas, co-founder and CEO, carry his byline. The rest are published as Didit.
Which topics does the blog cover?
Eight topics: ID verification, business verification (KYB), AML, sanctions and compliance, fraud prevention, transaction monitoring and crypto, country guides, agents and developers, and product updates.
Is the blog available in my language?
Yes, in 15 languages: English, Spanish, French, German, Brazilian and European Portuguese, Catalan, Russian, Arabic, Chinese, Japanese, Hindi, Indonesian, Korean and Swahili. Not every post is translated, so each language shows the posts it has.
Where do I find product updates?
In the changelog at /changelog/ and under the Product updates topic.
Are these posts legal advice?
No. Regulation posts explain rules; your legal team decides how they apply.
How do I find posts on one topic?
Open one of the eight topics, or search the blog.
Are posts dated?
Yes. Every post shows when it was published and when it was last updated.
Do posts link to the docs?
Developer posts link to the matching page on docs.didit.me and to the API reference.
Is the blog the same as the docs?
No. The blog explains rules, markets and product changes for a general reader, while docs.didit.me holds the integration guides and the API reference. Developer posts link the matching docs page and the API reference they describe.

Compliance built in

Audited, certified and attested.

We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center

  • Regulation encoded into your flows

    Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.

  • Ready for AMLR

    Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.

  • Tested in Spain's Treasury sandbox

    Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.

  • Audited, not self-declared

    iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • SOC 2 Type 2
  • ISO 27001
  • iBeta Level 1 and Level 2
  • EU regulator attestation
  • FSM youth protection
  • GDPR
  • EBA remote onboarding
  • MiCA compatible
  • FIDO Alliance member
  • AMLREU AML Regulation ready

Integration · Didit MCP

Run Didit from your own AI agent

Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
  • Run investigationsAsk why a session was declined, review cases, search people and companies.
  • Change rulesCreate payment rules, test them on past data and switch them on.
  • Pull reportsAsk for numbers, exports or the audit log.

Verify your first user today.

Start free

Free sandbox. Credit applies to work-email sign-ups.