certauth | Simple CertificateAuthority and host certificate creation

 by   ikreymer Python Version: 1.3.0 License: MIT

kandi X-RAY | certauth Summary

kandi X-RAY | certauth Summary

certauth is a Python library. certauth has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install certauth' or download it from GitHub, PyPI.

Simple CertificateAuthority and host certificate creation, useful for man-in-the-middle HTTPS proxy
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              certauth has a low active ecosystem.
              It has 25 star(s) with 10 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 0 open issues and 3 have been closed. On average issues are closed in 335 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of certauth is 1.3.0

            kandi-Quality Quality

              certauth has 0 bugs and 0 code smells.

            kandi-Security Security

              certauth has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              certauth code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              certauth is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              certauth releases are not available. You will need to build from source code and install.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.

            Top functions reviewed by kandi - BETA

            kandi has reviewed certauth and discovered the below as its top functions. This is intended to give you an instant insight into certauth implemented functionality, and help decide if they suit your requirements.
            • Load and store a certificate
            • Generates a host certificate
            • Get the domain of a host
            • Check if host is an IP address
            • Make a certificate
            • Return the contents of the given host
            • Read certificate from file
            • Dump a private key and certificate
            • Return the key for a given host
            • Load the root certificate
            • Generate a root certificate
            Get all kandi verified functions for this library.

            certauth Key Features

            No Key Features are available at this moment for certauth.

            certauth Examples and Code Snippets

            No Code Snippets are available at this moment for certauth.

            Community Discussions

            QUESTION

            HTTP2 .Net Framework issues with gRPC
            Asked 2021-Nov-03 at 15:59

            I need to use gRPC for bi-directional streaming, where the client is a .Net Framework project, which due to legacy stuff, can't be upgraded to .NET5+.

            When reading microsoft documentation, i can see that the WinHttpHandler should be used (https://docs.microsoft.com/en-us/aspnet/core/grpc/netstandard?view=aspnetcore-5.0).

            But i seem to have an issue using SSL with this setup, does anybody have a suggestion to what can be done to solve this issue?

            I get the following error:

            "InvalidOperationException: SslCredentials with non-null arguments is not supported by GrpcChannel. GrpcChannel uses HttpClient to make gRPC calls and HttpClient automatically loads root certificates from the operating system certificate store. Client certificates should be configured on HttpClient. See https://aka.ms/aspnet/grpc/certauth for details."

            My server is setup with the following setup:

            ...

            ANSWER

            Answered 2021-Nov-03 at 15:59

            Probably something along the following lines (rough draft) should work:

            Source https://stackoverflow.com/questions/69825958

            QUESTION

            Server 2019 ADFS New Install Configuration Failing
            Asked 2021-Oct-27 at 10:11

            I have been trying to setup a new ADFS server and the configuration is failing with the following error: The SSL certificate subject alternative names do not support host name 'certauth.sts.domain.com'. Configuring certificate authentication binding on port '49443' and hostname 'sts.domain.com'.

            It ends with "The server is not operational."

            I have reinstalled, disabled carbon black and checked the firewall but nothing has helped so far. Any ideas?

            ...

            ANSWER

            Answered 2021-Oct-27 at 10:11

            • You are encountering the error because the subject name and subject alternative name in the SSL certificate installed, should be the same as the federation service name that is set while configuring ADFS role on the server. Since, that certificate only contains ‘sts.domain.com’ as the federation service name which is ultimately the subject name defined on the certificate and does not contain ‘certificate.sts.domain.com’ as a subject alternative name, thus, due to which you are encountering this error. Please find the below screenshot of the ADFS post-install configuration for your reference: -

            • As in Windows Server 2019, the ADFS setup by default installs ADFS role on port 443 using the same certificate with SAN (subject alternative name) on different hosts. Thus, you need to update your certificate to support SAN and configure it accordingly. Please find the below command to update certificate SAN binding on the same port, i.e., 443 with different hosts: -

            Source https://stackoverflow.com/questions/69727194

            QUESTION

            OnCertificateValidated not running - Self-Signed Certificate Client Authentication - ASP.NET Core and Kestrel
            Asked 2021-Jun-29 at 03:44

            I would like to authenticate clients connecting to my ASP.NET Core Web API (.NET 5) running on Kestrel using certificate-based authentication.

            In my Startup.cs I have the following in ConfigureServices:

            ...

            ANSWER

            Answered 2021-Jun-28 at 02:30

            Ok, so in the end I was able to solve my own problem. There were two different parts to solving it, but ultimately it only required a few small modifications to my project code.

            Recognizing client certificates

            Firstly, the server was not recognizing the self-signed client certificates as valid certificates. This can be solved by either 1. adding all of the client certificates (or a root CA that signs them all) to the trusted certificate store of the operating system or 2. adding a ClientCertificateValidation callback to kestrel to determine whether or not a certificate is accepted or rejected.

            Example of #2 (an adjustment to the ConfigureHttpsDefaults lambda in Program.cs) is below:

            Source https://stackoverflow.com/questions/68146868

            QUESTION

            Should we compare thumbprints in Mutual TLS?
            Asked 2021-Jun-03 at 19:36

            When implementing Mutual TLS using https://docs.microsoft.com/en-us/aspnet/core/security/authentication/certauth?view=aspnetcore-5.0 I see they are comparing the thumbprint of the client certificate to the thumbprint of the server certificate. But are these always guaranteed to be the same in production? Doesn't one only contain the public key and the other contains both the private and public keys? And if that was the case, wouldn't they have different thumbprints?

            ...

            ANSWER

            Answered 2021-Jun-03 at 19:36

            I found your point there and here is the answer, one paragraph before

            Because the same self-signed certificate is used in this example, ensure that only your certificate can be used.

            for some reason they chose to use same certificate for server and client (maybe for simplicity?) which is indeed a *BAD* practice in real world. Sharing same certificate between different entities never was a good idea. Client and server certificates must be different.

            Certificate-based client authentication is more difficult, because you need to have a an account directory to validate client certificate against. For example, Active Directory. This directory should implement certificate <-> principal mapping. When you receive the certificate, you search for principal in directory and if found, you can uniquely distinguish clients, validate their permissions, rights and perform logging.

            If no mapping found -- reject authentication, because you don't know the client.

            If you don't care in distinguishing clients, then you clearly don't need mutual authentication.

            And never hardcore client certificates/thumbprints in code, because they are periodically changed, therefore external account directory (which is updated using out-of-band process) is necessary.

            Though, you can implement the logic when arbitrary clients can connect to your server only when they have certificate issued by your private CA. It is valid scenario. In this case, you don't need external account directory and you validate that client certificate is issued by exact, or by one of pre-defined CAs in the list, then you allow subsequent communication. But they still are anonymous to your system.

            Edits based on your additions:

            If your case fits last paragraph, then:

            • validate general chain (i.e. time validity, extensions, revocation, etc.)
            • validate that immediate issuer is in the explicit list of approved by you CAs (private)

            Source https://stackoverflow.com/questions/67826888

            QUESTION

            Kerberos PKINIT - No matching entry found preauth (pkinit) verify failure: Certificate mismatch
            Asked 2021-May-21 at 11:33

            I have installed a FreeIPA master server including Kerberos. Furthermore I have one client server, enrolled in FreeIPA, to test the PKINIT feature of Kerberos. All servers run on CentOS7. A testuser exists in FreeIPA and this user is also listed in the one and only existing realm, when using list_principals in kadmin as testuser@REALMNAME.

            getprinc testuser also gives Attributes: REQUIRES_PRE_AUTH.

            I have created kdc and client certificates strictly following the documentation: https://web.mit.edu/kerberos/www/krb5-latest/doc/admin/pkinit.html. They have been signed by my own CA, whose certificate is also present on the client and the master.

            The [realm] config on the master is as follows:

            ...

            ANSWER

            Answered 2021-May-21 at 11:33

            Here is a blog post I put together that should give you an idea how to setup Kerberos PKINIT preauthentication mechanism to authenticate an IPA user with a X.509 certificate:

            PKINIT with IPA and user certificates

            Source https://stackoverflow.com/questions/66457379

            QUESTION

            Getting client certificate
            Asked 2021-Apr-21 at 09:59

            I need to implement Client Certificate authentication on some of the endpoints in my .NET 5 Web API. So I don't want to enable HTTPS across all endpoint as described here in the MS docs. I am using Kestrel on my local machine and not IIS express or IIS.

            I have tried the following three methods with no luck on either of them:

            ...

            ANSWER

            Answered 2021-Apr-21 at 09:59

            You need to configure Kestrel to allow client certificates in the program.cs The default value is ClientCertificateMode.NoCertificate so in your ConfigureWebHostDefaults you need to change that to ClientCertificateMode.AllowCertificate.

            Here's an edited chunk of code from the docs you sent where I did that:

            Source https://stackoverflow.com/questions/67193225

            QUESTION

            Implement two authentication options (Token and Certificate) in ASP Net Core
            Asked 2020-Dec-08 at 14:59

            [Target netcoreapp3.1]

            Hi there! So I have this Web Api that is protected by a middleware of this form in my Startup.cs:

            ...

            ANSWER

            Answered 2020-Jun-19 at 20:14

            Hope what follows will help someone! I eventually found this link : https://docs.microsoft.com/en-us/aspnet/core/security/authorization/limitingidentitybyscheme?view=aspnetcore-3.1

            It explains how to implement multiple authorization policies that both have a chance to succeed. Below is the solution I found using IIS after a bit more research:

            Startup.cs

            Source https://stackoverflow.com/questions/62472192

            QUESTION

            .net core 3.1 cert authentication returns 403 when deployed on Azure
            Asked 2020-Feb-14 at 12:02

            I have followed this documentation (https://docs.microsoft.com/en-us/aspnet/core/security/authentication/certauth?view=aspnetcore-3.1) to implement an authentication by certificat in my .net core 3.1 API. Everything works fine when I call my API on localhost, but I continously get an error 403 once the API is deployed on Azure. I have no idea of what happens as there is no additional information on logs. I just don't understand what causes the 403

            As I understand, when I call my API routes I have to provide the certificate inside the "X-ARR-ClientCert" header, which is working fine locally, but seems not being interpreted on Azure.

            Am I missing something ? Do I need to set a specific setting on my App Service ?

            ...

            ANSWER

            Answered 2020-Feb-14 at 12:02

            As the article said, if the correct certificate is sent to the server, the data is returned. If no certificate or the wrong certificate is sent, an HTTP 403 status code is returned.

            So, as Bhushan said, confirm your certificate has uploaded to azure app service.

            When you enable mutual auth for your application, all paths under the root of your app will require a client certificate for access. Exclusion paths can be configured by selecting Configuration > General Settings and defining an exclusion path.

            For more details, you could refer to this article.

            Source https://stackoverflow.com/questions/60223876

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install certauth

            You can install using 'pip install certauth' or download it from GitHub, PyPI.
            You can use certauth like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install certauth

          • CLONE
          • HTTPS

            https://github.com/ikreymer/certauth.git

          • CLI

            gh repo clone ikreymer/certauth

          • sshUrl

            git@github.com:ikreymer/certauth.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link