autocert | kubernetes add-on that automatically injects TLS | TLS library

 by   smallstep Go Version: v0.17.2-rc1 License: Apache-2.0

kandi X-RAY | autocert Summary

kandi X-RAY | autocert Summary

autocert is a Go library typically used in Security, TLS, Docker applications. autocert has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Autocert is a kubernetes add-on that automatically injects TLS/HTTPS certificates into your containers. To get a certificate simply annotate your pods with a name. An X.509 (TLS/HTTPS) certificate is automatically created and mounted at /var/run/autocert.step.sm/ along with a corresponding private key and root certificate (everything you need for mTLS). We ️ feedback. Please report bugs & suggest enhancements. Fork and send a PR. Give us a if you like what we're doing.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              autocert has a low active ecosystem.
              It has 596 star(s) with 50 fork(s). There are 17 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 13 open issues and 29 have been closed. On average issues are closed in 73 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of autocert is v0.17.2-rc1

            kandi-Quality Quality

              autocert has no bugs reported.

            kandi-Security Security

              autocert has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              autocert is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              autocert releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of autocert
            Get all kandi verified functions for this library.

            autocert Key Features

            No Key Features are available at this moment for autocert.

            autocert Examples and Code Snippets

            No Code Snippets are available at this moment for autocert.

            Community Discussions

            QUESTION

            How to deploy an Echo app with HTTPS in GKE?
            Asked 2021-Mar-12 at 09:05

            How to deploy an Echo app with HTTPS in GKE?

            Using Echo framework developed a web app. Set https:// feature with its Auto TLS.

            ...

            ANSWER

            Answered 2021-Mar-12 at 09:05

            If you are just starting with GKE I recommend you to just create the service and deployment and use the UI to create the ingress and the managed certs

            I created and deploy a sample application:

            Code in main.go

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

            QUESTION

            What causes urn:acme:error:unauthorized 403 error in golang's acme/autocert?
            Asked 2020-Jun-23 at 22:23

            The full error message is:

            403 urn:acme:error:unauthorized: Account creation on ACMEv1 is disabled. Please upgrade your ACME client to a version that supports ACMEv2 / RFC 8555. See https://community.letsencrypt.org/t/end-of-life-plan-for-acmev1/88430 for details

            And I've googled this and reviewed that link, but I'm just using:

            golang.org/x/crypto/acme/autocert

            package in a very normal way:

            ...

            ANSWER

            Answered 2020-Jun-23 at 22:23

            This statement:

            In fact this code has been running and working fine for the last 6 months. But just today I switched the server it was on and now get the above message.

            Might indicate that you're building against an older version of golang.org/x/crypto - check your go.mod file and ensure you're using a fairly recent version. I completed a project recently that uses almost identical code. The require in my go.mod looks like this:

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

            QUESTION

            Will autocert renew certificate or should you do it yourself
            Asked 2020-Jun-16 at 10:10

            Regarding Letsencrypt and go autocert - I am asking here as I see autocert being a go package( Please direct or correct me.)

            Will golang.org/x/crypto/acme/autocert renew certificate automatically, or should you:

            1. make a timer,
            2. check date
            3. Renew(before expire
            ...

            ANSWER

            Answered 2020-Jun-16 at 10:10

            QUESTION

            How can I use Go's autocert package with CloudFlare?
            Asked 2020-Feb-27 at 06:01

            I tried running this example code from the autocert documentation, changing it to use my domain:

            ...

            ANSWER

            Answered 2020-Feb-27 at 06:01

            On CloudFlare, go to SSL/TLS and then the Origin Server tab. Click the Create Certificate button and they'll make one for you for free. You can use that to work with their Full (strict) encryption setting.

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

            QUESTION

            Mercure + Angular + Symfony >>> all on local machine
            Asked 2019-Nov-07 at 08:44

            I'm local on Mac OS 10.14.6 using Angular 8, Symfony 4.3 and mercure 0.72 darwin. I'm quite new to symfony. I wanted to dispatch updates only to authorized clients on my local machine. So far it really is a big pain. I hope I can find some help or answers here.

            Last error I get is

            http: TLS handshake error from ip:55289: acme/autocert: unable to authorize "mydyndns-url.com"; challenge "http-01" failed with error: acme: authorization error for mydyndns-url.com: 400 urn:acme:error:connection: Fetching http://mydyndns-url.com/.well-known/acme-challenge/SomeHash: Error getting validation data; challenge "tls-alpn-01" failed with error: acme: authorization error for mydyndns-url.com: 400 urn:acme:error:connection: Connection refused

            plus

            ...

            ANSWER

            Answered 2019-Nov-07 at 08:44

            OK, I managed to solve it (not perfect yet, but running, and it's for development only anyway).

            • Of course I generated my JWT https://jwt.io/#debugger-io
            • Followed the mercure setup for symfony https://symfony.com/doc/current/mercure.html#running-a-mercure-hub
            • In Symfony installed composer require symfony/mercure-bundle
            • I got my self a dyndns with a wildcard from https://www.dynu.com/
            • I configured my router (fritzbox) to forward port 80 and 443 http. (temporarily, for the certbot certificate creation only !!!)
            • I called sudo ifconfig lo0 alias [public IP] up
            • I added three subdomains of my dyndns domain to my /etc/hosts file (client.mydomain.dynu.org,api.mydomain.dynu.org,hub.mydomain.dynu.org) bound to my public IP.
            • I used letsencrypt certbot with sudo certbot certonly --standalone and created one cert for 4 domains (client.mydomain.dynu.org,api.mydomain.dynu.org,hub.mydomain.dynu.org,mydomain.dynu.org)
            • I then changed my /etc/hosts file and bound all 4 domains to 127.0.0.1
            • I configured my apache to load the proxy plugins

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

            QUESTION

            TLS for GRPC service running behind Nginx using Golang
            Asked 2019-May-06 at 09:41

            I have a flutter app (dart based) and a GoLang server, using GRPC.

            I wanted to secure it, so I tried setting up Ngninx with certbot(I'm new at this), but the bot requires a challenge where it connects to the Web service (for the Domain) for an http response, which my service doesn't give. It is possible to run both GRPC and HTTP server on the same port, but I couldn't understand how to setup Nginx for that.

            Then I tried setting up TLS for my service itself using autocert but doing that with acme requires the same web service response and without that I have to give manual certificates and skip insecure verify which isn't available in dart for now (only two options available secure and insecure). And testing autocert on local doesn't help either as it doesn't even create local certs (at least for me).

            I also read about a DNS challenge which requires a DNS TXT record, but I'm not sure if it'll ask me to put up a new TXT record on every renewal.

            Anyway, I'm mostly confused as to how to move forwards with this. I connect with GRPC to actual mobile apps and haven't found many tutorials or questions regarding this anywhere. My GoLang server also interacts with other internal micro-services, so making it TLS supported would also mean redeploying all other services with secure flag enabled.

            Any help regarding what I should do to secure my GRPC connection to apps, would be amazing!

            Relevant docs:

            Apologies if this is a stupid question, but I've been stuck on this for a week.

            ...

            ANSWER

            Answered 2019-May-06 at 09:41

            Just posting what I ended up doing for my setup. Nginx does support GRPC with version 1.3.10+ but requires a lot of manual work and a cron job to auto renew certificates, and it lacked documentation for a how-to.

            I ended up using Traefik instead, I've documented the whole process and why I chose Traefik on a blog post here

            In short, Traefik allowed for a simpler setup and very detailed GRPC documentation to get started. Another plus was it runs inside of a docker itself, so could easily test on my mac for the same version I'd deploy on the servers. It provided auto cert renewal in the box and with a DNS challenge, I could easily verify the domains.

            Sample TOML file for TLS termination at the reverse proxy end, for GRPC and normal REST services, supporting http (for older apps) & https.

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

            QUESTION

            ACME certificate for GRPC
            Asked 2019-May-03 at 12:49

            Is it possible to fit a m.GetCertificate into a GRPC client / server?

            ...

            ANSWER

            Answered 2018-Apr-18 at 20:21

            QUESTION

            Missing Field or method Signature Scheme in autocert on arm
            Asked 2018-Dec-17 at 13:30

            I am writing a program in go which makes an HTTP request to different server and reads the response. The program works absolutely fine on Windows/Mac but when I run the program on ARM based Rasp Pi 3 with Rasbian OS, it fails.

            Every-time I try to build the code it throws this error, could any suggest what I am doing wrong here?

            ...

            ANSWER

            Answered 2018-Dec-17 at 13:30

            Make sure to use the same Go version as the other platforms. Some features may have been added in a newer version.

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

            QUESTION

            Using autocert for multiple subdomains and ip addresses via DNS
            Asked 2018-Nov-28 at 16:59

            I have two separate servers using the same domain name with separate prefixes, one doing some app stuff and one doing filesharing. Using the autocert package how can I just configure the cert manager to produce a certificate that I can use on both servers?

            ...

            ANSWER

            Answered 2018-Nov-28 at 16:59

            Add both domains to the cert manager white list:

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

            QUESTION

            acme autocert manager ignores valid certificates on startup
            Asked 2018-Nov-21 at 11:46

            I'm building currently a service that uses acme/autocert. To use that service with more than 1 replicas, I had to write a persistent cache interface like DirCache. Then I noticed, that after restarting the service all valid certs in the Cache got ignored on the startup. The following sequence happens all the time:

            • Cache put acme_account+key (even if it exists in the cache)
            • Cache get acme_account+key
            • Cache get my.domain.net (it returns the cached cert)
            • Cache get acme_account+key
            • Cache put my.domain.net+token
            • Cache put HASH+http-01
            • Cache delete HASH+http-01
            • Cache delete my.domain.net+token
            • Cache put my.domain.net (put the new cert)

            Is this the correct behavior? Because every replica would create its own cert and a persistent Cache is not possible with this circumstances

            Here is my manager factory

            ...

            ANSWER

            Answered 2018-Nov-21 at 11:46

            The solution for this question is that the cache interface and behavior works correctly. My cache implementation was faulty. I had a goroutine within the Cache.Get(...) that read from a DB to a channel, but unfortunately the outer func body did not wait for that channel and returns always a CacheMissed error. After the fix everything works fine. My fault sry

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install autocert

            To install autocert run:. You might want to check out what this command does before running it. You can also install autocert manually if that's your style.

            Support

            If that doesn't work for you, or if you have a better idea, we'd love to hear! Please open an issue!. Mostly because monitoring the API server to figure out which services are associated with which workloads is complicated and somewhat magical. And it might not be what you want. That said, we're not totally opposed to this idea. If anyone has strong feels and a good design please open an issue. Yes, it uses a bunch of CAs for different sorts of control plane communication. Technically, kubernetes doesn't come with a CA. It has integration points that allow you to use any CA (e.g., Kubernetes the hard way uses CFSSL. You could use step certificates, which autocert is based on, instead. In any case, these CAs are meant for control plane communication. You could use them for your service-to-service data plane, but it's probably not a good idea. Autocert needs permission to create and delete secrets cluster-wide. You can check out our RBAC config here. These permissions are needed in order to transmit one-time tokens to workloads using secrets, and to clean up afterwards. We'd love to scope these permissions down further. If anyone has any ideas please open an issue. The autocert admission webhook needs to securely transmit one-time bootstrap tokens to containers. This could be accomplished without using secrets. The webhook returns a JSONPatch response that's applied to the pod spec. This response could patch the literal token value into our init container's environment. Unfortunately, the kubernetes API server does not authenticate itself to admission webhooks by default, and configuring it to do so requires passing a custom config file at apiserver startup. This isn't an option for everyone (e.g., on GKE) so we opted not to rely on it. Since our webhook can't authenticate callers, including bootstrap tokens in patch responses would be dangerous. By using secrets an attacker can still trick autocert into generating superflous bootstrap tokens, but they'd also need read access to cluster secrets to do anything with them. Hopefully this story will improve with time. Great idea! This should be pretty easy to add. However, existing service accounts are somewhat broken for this use case. The upcoming TokenRequest API should fix most of these issues. TODO: Link to issue for people who want this. We don't. It's just easier for you. Your containers can generate key pairs, exchange them for certificates, and manage renewals themselves. This is pretty easy if you install step in your containers, or integrate with our golang SDK. To support this we'd need to add the option to inject a bootstrap token without injecting these containers. TODO: Link to issue for people who want this. That said, the init container and sidecar are both super lightweight. Because, by default, kubernetes secrets are stored in plaintext in etcd and might even be transmitted unencrypted across the network. Even if secrets were properly encrypted, transmitting a private key across the network violates PKI best practices. Key pairs should always be generated where they're used, and private keys should never be known by anyone but their owners. That said, there are use cases where a certificate mounted in a secret resource is desirable (e.g., for use with a kubernetes Ingress). We may add support for this in the future. However, we think the current method is easier and a better default. TODO: Link to issue for people who want this.
            Find more information at:

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

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular TLS Libraries

            mkcert

            by FiloSottile

            v2rayN

            by 2dust

            acme.sh

            by acmesh-official

            nginxconfig.io

            by digitalocean

            v2ray

            by 233boy

            Try Top Libraries by smallstep

            certificates

            by smallstepGo

            cli

            by smallstepGo

            step-issuer

            by smallstepGo

            truststore

            by smallstepGo

            hello-mtls

            by smallstepJavaScript