Skip to content

metaphor-cloud/aws-instance-identity-certificates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-instance-identity-certificates

Overview

aws-instance-identity-certificates is an npm module that provides utilities for working with AWS instance identity documents and certificates. It helps in verifying the identity of EC2 instances and ensures secure communication between services.

The verification process is taken from the AWS documentation: Verify the instance identity document for an Amazon EC2 instance

The certificates are scraped from this wonderfully user hostile format for supplying certificates

Installation

To install the module, use npm:

npm install aws-instance-identity-certificates

Usage

Here is an example of how to use the module:

const { verifyIdentityDocument } = require('aws-instance-identity-certificates');

const document = '...'; // Your instance identity document
const signature = '...'; // The corresponding signature

verifyIdentityDocument(document, signature)
  .then(isValid => {
    if (isValid) {
      console.log('The identity document is valid.');
    } else {
      console.log('The identity document is invalid.');
    }
  })
  .catch(error => {
    console.error('Error verifying identity document:', error);
  });

API

verifyIdentityDocument(document, signature)

Verifies the given instance identity document and its signature.

  • document (string): The instance identity document.
  • signature (string): The signature of the document.

Returns a promise that resolves to a boolean indicating whether the document is valid.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

About

Public certificates for AWS Instance Identity Documents. Useful when publishing EC2 AMIs via the AWS Marketplace.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published