Should we make SslOptions be more explicit about where it loads certifications?
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
Direzione di ricerca
Inizia leggendo SslOptions.java intorno alla riga 245 e segui come vengono attualmente risolti i percorsi dei certificati. Confronta i casi espliciti classpath e file URI indicati nell’issue con il comportamento di fallback esistente, quindi conferma le regole di compatibilità previste e aggiungi la coverage per i percorsi di risoluzione concordati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I'm not sure I like the default fallback behavior here:
Instead I recommend something more like:
static InputStream getResource(
String path)
throws FileNotFoundException, IOException {
URI uri = URI.create(path);
/*
* Explicit
*/
if ("classpath".equals(uri.getScheme())) {
var classpath = uri.getPath();
if (classpath == null) {
throw new FileNotFoundException(path);
}
return getClasspathResource(classpath);
}
if ("file".equals(uri.getScheme())) {
return Files.newInputStream(Path.of(uri));
}
/*
* Implicit
*/
Path filepath = Paths.get(path);
if (Files.exists(filepath)) {
// absolute file:
return Files.newInputStream(filepath);
}
// Maybe do not do this
return getClasspathResource(path);
}
This is where classpath:/// and file:/// can be explicitly used and then if that is not used we do the original behavior with the eventual goal of not doing the classpath unless it has the classpath uri schema.
The reason is assume I package a certification in the classpath. It works normally. Then someone adds a classpath on the filesystem when I go deploy. It now overrides the classpath one.
Now I admit this is unlikely and if this was not certs I could care less but I think we should not go around sniffing for certs. It also seems more inline with how we no longer use the service loader. That is less implicit behavior.
Otherwise I mostly don't care but just think this is the right thing to do.
- Lingua principale
- Java
- Stelle
- 1.8k
- Fork
- 207
- Merge medio
- 1g 8h
- PR unite (30g)
- 20
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di jooby-project/jooby
-
Rainbow Gum logging moduleAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
jooby-project/jooby#4021 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Add Jooby CLI to SDKMANAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
jooby-project/jooby#3521 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
jooby-1.x are brokenApertaquestion
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
jooby-project/jooby#1513 · 10 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di jooby-project/jooby
Issue simili
-
area:core bug priority:p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
aomarai/minecraft-mcp#247 ·
I maintainer di solito rispondono entro 1 giorno
-
help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
antonyrag/ragleap-core#1062 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Vakore/ZappierGames#232 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
constellation-app/constellation#2588 ·