GithubHelp home page GithubHelp logo

pemts's Introduction

PEMTS

Introduction

A Java trust store is an instance of KeyStore which only contains certificates. There are various types of KeyStore implementations. For example JCEKS, JKS, PKCS11 implementations are bundled with JDK. Unfortunately none of these implementations are FIPS compliant and you have to use a thirdparty implementation such as BCFKS to be FIPS compliant. You might end up having to configure your JVM with different format files for each environment.

Solution

Instead of relying on the native formats we implemented a trust store that is backed by the KeyStore API that allows you to create a trust store using a PEM file. All the pem entries from the supplied file are used for initializing the key store which in turn can be used for initializing TrustManagerFactory.

Features

  • This is a read only keystore implementation so all calls to modify entries would fail with runtime exceptions.
  • You are not expected to supply a password when initializing the store
  • StandardMBeans that expose metadata about the certificates loaded into the trust store for runtime monitoring.

Sample code

try (InputStream in = new BufferedInputStream(new FileInputStream("src/test/resources/single.pem"))) {
    KeyStore store = KeyStore.getInstance();
    KeyStore store = KeyStore.getInstance(ReadOnlyPEMTrustStore.NAME, TrustStoreProvider.NAME);
    store.load(in, null);
    TrustManagerFactory factory = TrustManagerFactory.getInstance("PKIX");
    factory.init(store);
}

pemts's People

Contributors

ppeddadaatsfdc avatar svc-scm avatar

Stargazers

Ashwin Jayaprakash avatar

Watchers

Caridy Patiño avatar Fiaz Hossain avatar James Cloos avatar Demian Brecht avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.