Coder Social home page Coder Social logo

martinpaljak / python-esteid Goto Github PK

View Code? Open in Web Editor NEW
15.0 6.0 1.0 216 KB

Estonian ID-card ecosystem library and utility for: LDAP, verification, key conversion (SSH), OCSP, Mobile-ID

Home Page: https://pypi.python.org/pypi/python-esteid

Python 98.94% Shell 1.06%

python-esteid's Introduction

Estonian ID-card "ecosystem" helper

  • PyPI version
  • GitHub version

The sk utility helps to:

  • query ldap.sk.ee in a meaningful way
  • convert ID codes to SSH keys
  • verify certificates against OCSP

This depends on M2Crypto either being available or being able to build it, ditto for python-ldap.

On Debian and derivatives:

sudo apt-get install build-essential libssl-dev swig libsasl2-dev libldap-dev python-dev

Usage

Some samples using the ID code of me (Martin Paljak 38207162722) or Edward Lucas (36205030034, found from this article).

  • Query my authentication certificate from LDAP:

    sk ldap 38207162722

  • Parse the certificate as well:

    sk ldap 38207162722 | openssl x509 -text -noout

  • Get my Digi-ID signing certificate:

    sk ldap 38207162722 --type sign --digi-id

  • If there are several certificates (with newer Mobile-ID), you can get them individually:

    sk ldap 38207162722 --type sign --mobiil-id --idx 2

  • There's a new type of certificates, e-residents:

    $ sk ldap 36205030034
    HINT: 36205030034 is an e-resident. Try again with --resident
    
  • So you can easily separate residents and e-residents:

    sk ldap 36205030034 --resident --type sign

  • If you use SSH and key based authentication, you can easily give access to certain persons:

    sk ssh 3820716272 36205030034 >> ~/.ssh/authorized_keys

Have fun!

Regards,

38207162722

python-esteid's People

Contributors

martinpaljak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

byungwoo733

python-esteid's Issues

Add "identify" command

That reads a PEM and tells who's the subject and if it is a resident or not. Possible to use from command line tools for branching for e-residents.

Rename pip package

The package in pip should be without python- prefix. Nice collection of scripts, keep up the good work man!

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.