Api use from external host

NethServer Version: 8

I want to push an updated Lets Encrypt certificate (wildcard) from my nginx proxy using the acme client post update hooks.

I have added an /API endpoint to the HTTP routes to pass requests to the api-server.
I can use the /api/login endpoint to successfully get the JWT token for my user api_user.
However, I am uncertain whether that user has suitable permissions for all modules.

I just cannot figure out the next steps to correctly form a curl command to the module endpoint (/module/traefik1) to either execute an action (list-certificates) or to upload a new certificate (upload-certificate).

If anyone can help I would be grateful.

1 Like

I never did solve this issue, I just worked around it.

I finally got my DNS-01 LetsEncrypt wildcard certificate working in Traefik, and moved all the reverse proxy entries to HTTP Routes. That meant I could just decommission the nginx proxy and associated ACME client. This was an approach I had considered previously, but I initially had issues getting a wildcard certificate automated.

1 Like

Hi Simon, I’m happy you find an alternative solution.

About DNS challenge you may remember this thread NS8 and DNS-01 wildcard certificates.

To invoke cluster-admin APIs from an external host this README could help ns8-core/core/api-server/README.md at main · NethServer/ns8-core · GitHub.