Issues with URL encoded ControllerIDs
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
- 30/100
Direzione di ricerca
Start by tracing how ControllerIDs are handled in the DDI API and Management API, then read the Spring Security StrictHttpFirewall configuration mentioned in the stack trace. Check existing tests for target creation and polling; done means both APIs handle URL-encoded ControllerIDs consistently and the behavior is covered by tests.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi!
I'm using the hawkbit/hawkbit-update-server:latest docker container.
There seem to be some issues/inconsistencies with URL encoded ControllerIDs:
- Creating a target with ControllerID
*works (management API).
Polling this target via the DDI API:
- Not URL encoded:
$ curl -H "Authorization: TargetToken 50aea537bce197fa3371215fbdc5f3c6" "http://localhost:8080/DEFAULT/controller/v1/*"
{"config":{"polling":{"sleep":"00:00:30"}},"_links":{"configData":{"href":"http://localhost:8080/DEFAULT/controller/v1/*/configData"}}}
- URL encoded:
$ curl -v -H "Authorization: TargetToken 50aea537bce197fa3371215fbdc5f3c6" "http://localhost:8080/DEFAULT/controller/v1/%2A"
[...]
< HTTP/1.1 401 Unauthorized
[...]
- Creating a target with ControllerID
öworks (management API).
Polling this target via the DDI API:
- Not URL encoded:
$ curl -v -H "Authorization: TargetToken da8935abe0960f7062c833fab173c6ee" "http://localhost:8080/DEFAULT/controller/v1/ö"
[...]
< HTTP/1.1 500 Server Error
[...]
{"timestamp":"2021-07-01T14:09:32.684+00:00","status":500,"error":"Internal Server Error","message":""}
hawkBit's logs tell us:
org.springframework.security.web.firewall.RequestRejectedException: The requestURI was rejected because it can only contain printable ASCII characters.
at org.springframework.security.web.firewall.StrictHttpFirewall.getFirewalledRequest(StrictHttpFirewall.java:345)
at org.eclipse.hawkbit.autoconfigure.security.SecurityManagedConfiguration$UISecurityConfigurationAdapter$IgnorePathsStrictHttpFirewall.getFirewalledRequest(SecurityManagedConfiguration.java:769)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:194)
[...]
- URL encoded:
$ curl -v -H "Authorization: TargetToken da8935abe0960f7062c833fab173c6ee" "http://localhost:8080/DEFAULT/controller/v1/%C3%B6"
[...]
< HTTP/1.1 401 Unauthorized
[...]
So we can obviously create targets that cannot poll the DDI API, right?
But maybe if we create the target with a URL encoded ControllerID?
- Creating a target with ControllerID
%C3%B6works (management API).
Polling this target via the DDI API:
- URL encoded:
$ curl -H "Authorization: TargetToken 920e8c8b58619c836efc47960422c5e2" "http://localhost:8080/DEFAULT/controller/v1/%C3%B6"
{"config":{"polling":{"sleep":"00:00:30"}},"_links":{"configData":{"href":"http://localhost:8080/DEFAULT/controller/v1/%C3%B6/configData"}}}
So this works. But now there is a new target "ö" listed in the Web UI:
Status registered
Description: Plug and Play target: ö
Last poll: Thu Jul 1 16:16:56 CEST 2021
Security token: 1e9f7827e9d6bab45ac8d8d0cbc26aed
Created by: CONTROLLER_PLUG_AND_PLAY
[...]

The URL encoded target %C3%B6 is not marked as registered, "Last poll" is empty, although it's security token (TargetToken) was accepted. Is this intended behavior?
Expected behavior: It would be nice to know which characters are allowed in the ControllerID. Ideally they should be accepted URL encoded. And the DDI API as well as the Management API should accept/deny them consistently.
- Lingua principale
- Java
- Stelle
- 601
- Fork
- 228
- Merge medio
- 15h 48m
- PR unite (30g)
- 62
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la 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 eclipse-hawkbit/hawkbit
-
hawkbit-dmf-server 1.1.0 does not start: NoClassDefFoundError jakarta/servlet/ServletResponseAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
eclipse-hawkbit/hawkbit#3429 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Action status code catalog: name, description and severity for reported status codesForse già presa @strailov l’ha presa 6 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
eclipse-hawkbit/hawkbit#3436 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Configurable automatic retries for failed actions (policy, backoff, rollout and auto-assignment support)Forse di nuovo libera @strailov l’ha presa 87 giorni fa e non c’è nessuna pull request aperta. Apertafeature request
eclipse-hawkbit/hawkbit#3251 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
IN_SYNC and rollout success can be recorded while the device still runs the old imageForse di nuovo libera @denislavprinov l’ha presa 119 giorni fa e non c’è nessuna pull request aperta. Aperta
eclipse-hawkbit/hawkbit#3185 · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
eclipse-hawkbit/hawkbit#2993 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di eclipse-hawkbit/hawkbit
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 3 giorni
-
A proxy that fails to start logs a RejectedExecutionException stack trace from its shutdown hookApertafollow-up
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Sanne/incus-spawn#1953 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
HexaHexes/ability-battlewills#37 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Shweit/EtherealPortals#30 ·