Giter Site home page Giter Site logo

duplcertdetect's Introduction

duplCertDetect

Detecting duplicate certs before enabling ssl in glusterfs

For those who have been using glusterfs for sometime now, enabling and using SSL starts with the process of certificate creation. Now this can be either a self signed certificate, i.e. you create your own certs for the nodes and combine the certs to create a glusterfs.ca ( basically appending all the public certs of nodes into a file ), or derive your certs from a root CA following the process of certificate signing etc, etc.

This python script is basically concerned about the method 1, wherein we create self signed certificates. Due to human error or an issue with the algorithm being used to concatenate the certs into a .ca file ( which again is technically human error only as it was a human who wrote the code ), there might be a duplicate entry of a certificate or two.

This duplicate entry would lead to some grave issues when one goes ahead and enables the ssl in glusterfs and one might look into an error of the form -> [2021-02-18 11:11:11.12312] E [socket.c:246:ssl_dump_error_stack] 0-socket.management: error:0B07C065:x509 certificate routines:X509_STORE_add_cert:cert already in hash table

Which actually implies a duplicate entry inside the glusterfs.ca.

This script is about taking a pre-emptive approach and checking the glusterfs.ca for any existing duplicates inside them. ( I'd suggets using ansible to run this script in all nodes and get the result to check if everything is well and good before enabling the ssl option ).

To run the script one just needs to give the path to the glusterfs.ca python3 dupl_cert.py <path_to_glusterfs.ca>

If there are any duplicate entries, the script will dump those public keys.

duplcertdetect's People

Watchers

 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.