Allows you to use AWS KMS asymmetric keys as PGP/GPG keys.

Overview

KMS for PGP/GPG

This tool allows you to use AWS KMS asymmetric keys as if they were PGP/GPG keys. (Only for signatures for now.)

This can be useful if you have CI/CD pipelines signing code or artifacts and you don't wish to do all the hassle of proper cryptographic key management.

It's also useful if you wish to use AWS CloudHSM keys via the KMS API for PGP/GPG operations.

How to use?

Download the latest release from the Github Releases page. Since this is a Java project you can get the Jar, distribution Zip (which you can conveniently install on any OS) or a GraalVM native-image build for a fat binary that only depends on the OS and architecture (no Java needed).

kmspgp only runs when the proper AWS credentials are set. It uses the AWS SDK defaults which obey environment variables, profile files and/or instance metadata credentials.

You should have already created an asymmetric key for signing/verification only in KMS, and have the proper access to the key (DescribeKey, GetPublicKey must be allowed). To list keys additionally the ListKeys action should be allowed.

Listing keys

You can list all usable keys with the list subcommand.

Exporting a key

Exporting a key in the PGP/GPG format so that it can be shared publicly is done using the export subcommand. You must pass the --user-name, --user-email options wich govern the PGP/GPG user ID (NAME <EMAIL> (COMMENT) format).

Exporting requires the Sign action to be allowed, since it performs a signing operation.

Usually you do this once, and then share the exported file.

Signing data

You can sign data by using the sign subcommand. It reads from STDIN and then signs the data using the provided key.

GPG fallback mode for Git signing

You can use kmspgp in GPG fallback mode to sign Git commits. In your Git project specify the following configuration:

git config --local gpg.program <PATH-TO-KMSPGP>
git config --local user.signingkey <KMS-KEY-ARN>
git config --local commit.gpgsign true
git config --local tag.forceSignAnnotated true

Whenever you call git commit you would need AWS credentials setup so that signing can take place.

License

This software is Copyright © Stojan Dimitrovski 2022.

Licensed under the MIT License. You can get a copy of it in the LICENSE file.

This distribution includes the excellent Bouncy Castle library for Java which is also licensed under the MIT license.

Additionally, some dependencies may be licensed under the Apache 2.0 license.

You might also like...
A very simple Android app which shows you random memes with the help of meme-api which you can share with your friends!
A very simple Android app which shows you random memes with the help of meme-api which you can share with your friends!

Meme Share A very simple Android app which shows you random memes with the help of meme-api which you can share with your friends! Tech stack 100% wri

A simple tool used to check the users you follow that do not follow you back.

instafbchecker - Instagram no life guide Current Release: v1.0.1 (30/08/2022) A command line tool used to check which users dont follow you back on In

If you had one month to visit the best places in Kenya, where would you go?
If you had one month to visit the best places in Kenya, where would you go?

VisitKenya If you had one month to visit the best places in Kenya, where would you go? This app just shows you sample places where you could visit, wi

An application that allows the user to update variety of smartphones that are used such as iPhone and Android
An application that allows the user to update variety of smartphones that are used such as iPhone and Android

PhoneApplication An application that allows the user to update variety of smartphones such as iPhone and Android. This application allows users to add

Kotlin compiler plugin that allows class delegation to be dynamic like property delegations

kotlin-dynamic-delegation Kotlin compiler plugin that allows class delegation to be dynamic like property delegations. The plugin is working in progre

The tool allows to dump binary API of a Kotlin library

Binary compatibility validator The tool allows to dump binary API of a Kotlin library that is public in sense of Kotlin visibilities and ensures that

Simple addon for BlueMap that allows using a custom skin server.
Simple addon for BlueMap that allows using a custom skin server.

BlueMap Custom Skin Server Description Simple addon for BlueMap that allows using a custom skin server. Config { "debug": false,

📒 NotyKT is a complete 💎Kotlin-stack (Backend + Android) 📱 application built to demonstrate the use of Modern development tools with best practices implementation🦸.
📒 NotyKT is a complete 💎Kotlin-stack (Backend + Android) 📱 application built to demonstrate the use of Modern development tools with best practices implementation🦸.

NotyKT 🖊️ NotyKT is the complete Kotlin-stack note taking 🖊️ application 📱 built to demonstrate a use of Kotlin programming language in server-side

 🍲Foodium is a sample food blog Android application 📱 built to demonstrate the use of Modern Android development tools - (Kotlin, Coroutines, Flow, Dagger 2/Hilt, Architecture Components, MVVM, Room, Retrofit, Moshi, Material Components).
Owner
Stojan Dimitrovski
Craftsman of bits and bytes.
Stojan Dimitrovski
This library is created to make files uploading and downloading on Aws easier

S3Manager - aws files uploading library This library is created to make files uploading and downloading on Aws easier Features Easy to use Single/mult

Rajesh Khuti 0 Apr 30, 2022
sample project that shows you how you can use Ktor to creat a server for real Project.

Ktor-Sample This is a sample project that shows you how you can use Ktor to creat a server for real Project. What is done Save data to database (Get a

Mohamed Emad 4 Dec 23, 2022
Gradle plugin which allows to use typed DSL for generating kubernetes/openshift YAML files

gr8s Gradle plugin which allows using typed DSL for generating kubernetes/openshift YAML files. Based on kuberig Usage import io.github.guai.gr8s.Gene

null 0 Jan 3, 2022
ViewModel-Lifecycle - ViewModel Lifecycle allows you to track and observe Jetpack ViewModel's lifecycle changes

ViewModel Lifecycle ?? ViewModel Lifecycle allows you to track and observe Jetpa

Jaewoong Eum 97 Nov 25, 2022
Viewmodel-lifecycle - ViewModel Lifecycle allows you to track and observe Jetpack ViewModel's lifecycle changes

ViewModel Lifecycle ?? ViewModel Lifecycle allows you to track and observe Jetpa

Jaewoong Eum 36 Feb 6, 2022
A media player, currently only for Android, that allows you to play songs in background for free

Just Listen A music player currently only for android. It is using Audius public APIs to display and get the playlists/songs. Available on google play

null 68 Dec 27, 2022
KVision allows you to build modern web applications with the Kotlin language

KVision allows you to build modern web applications with the Kotlin language, without any use of HTML, CSS or JavaScript. It gives you a rich hierarchy of ready to use GUI components, which can be used as builder blocks for the application UI.

Robert Jaros 985 Jan 1, 2023
An Android template you can use to build your project with gradle kotlin dsl

Android Gradle KTS An Android template you can use to build your project with gradle kotlin dsl Build.gradle.kts You can use your project's build.grad

Deep 17 Sep 12, 2022
This is a practice app. An app that you can find random recipes and choose the ones you like.

A food suggestion app like Tinder This is a practice app. In this app, you can find random recipes and choose the ones you like. This is main menu. Yo

Yunus Emre OCAK 4 May 25, 2022
A Simple Android library to get the number of words and give you the time it will take you to finish an article/story.

MinRead A Simple Android library to get the number of words and give you the time it will take you to finish an article/story. Prerequisite Androidx K

Nwokocha wisdom maduabuchi 36 Nov 17, 2021