Support for ZKRoutingDataWriter to forward write requests as HTTPS as part of MetadataStoreRouting
- Dominant language
- Java
- Stars
- 504
- Forks
- 255
- Avg merge
- 17d 47m
- Merged PRs (30d)
- 2
Description
**Is your feature request related to a problem? Please describe.**
We do not allow HTTP write requests (PUT, POST, DELETE) to our helix-rest deployments. When a HTTPS write request is made to helix-rest on the RoutingData (aka modifying a sharding key), if the request does not hit the ZK_ROUTING_DATA_WRITER_LEADER, then it will forward the request to the leader but as an HTTP request.
The current workaround is to directly resolve the curl request to the host that is the current ZK_ROUTING_DATA_WRITER_LEADER so that the request is not forward.
**Relevant methods:**
[`buildAndSendRequestToLeader`](https://github.com/apache/helix/blob/350795ce88c70440b596922ad66539418c243edf/helix-rest/src/main/java/org/apache/helix/rest/metadatastore/accessor/ZkRoutingDataWriter.java#L383)
[`addMetadataStoreRealm`](https://github.com/apache/helix/blob/350795ce88c70440b596922ad66539418c243edf/helix-rest/src/main/java/org/apache/helix/rest/metadatastore/accessor/ZkRoutingDataWriter.java#L140)
[`deleteMetadataStoreRealm`](https://github.com/apache/helix/blob/350795ce88c70440b596922ad66539418c243edf/helix-rest/src/main/java/org/apache/helix/rest/metadatastore/accessor/ZkRoutingDataWriter.java#L155)
[`addShardingKey`](https://github.com/apache/helix/blob/350795ce88c70440b596922ad66539418c243edf/helix-rest/src/main/java/org/apache/helix/rest/metadatastore/accessor/ZkRoutingDataWriter.java#L170C31-L170C45)
[`deleteShardingKey`](https://github.com/apache/helix/blob/350795ce88c70440b596922ad66539418c243edf/helix-rest/src/main/java/org/apache/helix/rest/metadatastore/accessor/ZkRoutingDataWriter.java#L186C31-L186C48)
**Describe the solution you'd like**
If possible, the ZKRoutingDataWriter should possibly support forwarding as HTTPS if the original request was also via HTTPS.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in helix-rest/src/main/java/org/apache/helix/rest/metadatastore/accessor/ZkRoutingDataWriter.java, reading buildAndSendRequestToLeader and its callers addMetadataStoreRealm, deleteMetadataStoreRealm, addShardingKey, and deleteShardingKey. Trace how the original request scheme reaches forwarding, then verify that an HTTPS request remains HTTPS when sent to the leader while existing routing behavior is preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100