Skip to content

rac021/certme-quarkus-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CertMe ( Quarkus-Extension )

Automatically Generating Let's Encrypt / SelfSigned Certificate At Buildtime / Runtime
Based on Java 11 & ACME ( Automatic Certificate Management Environment ) Client API
  1. Maven Dependecy :
   <dependency>
     <groupId>com.github.rac021</groupId>
     <artifactId>certme-quarkus-extension</artifactId>
     <version>1.9</version>
   </dependency>
  1. Build Step ( for let's Encrypt, need to be sudo in order to use the port 80 )

    • For Modifying the Port, use : -Dcertme_port=PortNumber
    • If not SUDO, the Certificate Generation will FAIL at Buidtime
    • If the Certificate Generation FAILED at Buidtime, a self-Signed Certif will be Generated at Runtime
    cd ../my_quarkus_project/ && sudo mvn clean package 
    
    # Will Create a "CertMe" Directory with Let's Encrypt Or SelfSigned Certificate
  1. Run Step

    • If No Let's Encrypt Certificate found in the Folder "certMe", a self-Signed Certificate will be Generated
    java -jar target/quarkus-app/quarkus-run.jar
    
    Go to : https://localhost:8443/hello
  1. Supported Arguments :
   -Dcertme_domain     : specify the domain. DEFAULT : Try to Resolve the Current Domain
   -Dcertme_interface  : Interface.          DEFAULT : 0.0.0.0
   -Dcertme_port       : Http Port Server.   DEFAULT : 80 ( Port Used By Let's Encrypt )
   -Dcertme_env        : DEV / PROD.         DEFAULT : DEV
   -Dcertme_file_name  : Certificate Name.   DEFAULT : "app" ( followed by "_domain-chain.crt" )
   -Dcertme_out_folder : Where the Certificates are generated. DEFAULT folder : certMe   
   -Dcertme_ignore     : if TRUE, CertMe will be ignored at Build / Runtime. DEFAULT : FALSE
   -Dcertme_force_gen  : if TRUE, CertMe will generate a new Certificate at Build / Runtime 
                         even if it exists . DEFAULT : FALSE 
  1. Build Step With Tests ( By Default, the tests are skiped ! )
    cd quarkus-certme-extention/ && sudo mvn clean install -Dmaven.test.skip=false

Improvements

  • Embed Generated Let's Encrypt certificate at buildTime
  • Add support of dns-01 challenge