microcks / microcks/microcks-cli
Persisted context TLS settings are inconsistent for different HTTPS servers
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 52
- Forks
- 68
- Ø Merge
- 6 Std. 54 Min.
- Gemergte PRs (30 T.)
- 10
Beschreibung
Describe the bug
The CLI stores TLS settings in the local server context, but the current behavior is inconsistent:
microcks loginalways persistsinsecureTLS: true, even when the user did not pass--insecure-tls.- Later commands that load the saved context do not honor the persisted
insecureTLSvalue when building the HTTP client.
This makes saved HTTPS contexts misleading. A context can contain insecureTLS: true, but commands such as import, import-url, import-dir, and test still fail unless --insecure-tls is repeated.
This affects Microcks instances exposed over HTTPS with self-signed certificates, private CA certificates, local ingress TLS, or internal reverse proxies.
Common examples:
- Microcks behind local
k3s/ ingress TLS - Microcks behind Caddy, nginx, Traefik, or an internal gateway
- Instances using private PKI
Expected behavior
If the user logs in with --insecure-tls, later commands using that saved context should honor the persisted TLS setting.
If the user logs in without --insecure-tls, the saved context should not be marked insecure.
Actual behavior
No response
How to Reproduce?
Given a Microcks server available at an HTTPS endpoint with a self-signed or private certificate:
microcks login https://microcks.example.local --insecure-tls
This succeeds and stores:
server: https://microcks.example.local
insecureTLS: true
But a later command using the saved context can fail:
microcks import openapi.yaml
with an error like:
tls: failed to verify certificate: x509: certificate signed by unknown authority
Repeating the flag makes the same command work:
microcks import openapi.yaml --insecure-tls
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit nachzuverfolgen, wie der Befehl login den Kontext des lokalen Servers speichert und wie import, import-url, import-dir und test ihre HTTP-Clients erstellen. Überprüfe beide Login-Pfade und das Laden gespeicherter Kontexte: --insecure-tls sollte gespeichert und später berücksichtigt werden, während ein Login ohne diese Option den Kontext nicht als unsicher markieren sollte.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- go
- Bereich
- cli
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 68/100