Skip to content

[CELEBORN-1609] Support SSL for celeborn RESTful service#2756

Closed
turboFei wants to merge 10 commits intoapache:mainfrom
turboFei:HADP_1609_ssl2
Closed

[CELEBORN-1609] Support SSL for celeborn RESTful service#2756
turboFei wants to merge 10 commits intoapache:mainfrom
turboFei:HADP_1609_ssl2

Conversation

@turboFei
Copy link
Member

@turboFei turboFei commented Sep 21, 2024

What changes were proposed in this pull request?

Support SSL for celeborn RESTful service.

Why are the changes needed?

For HTTP SSL connection requirements.

Does this PR introduce any user-facing change?

No, SSL is disabled by defaults.

How was this patch tested?

Integration testing.

celeborn.master.http.ssl.enabled=true
celeborn.master.http.ssl.keystore.path=/hadoop/keystore.jks
celeborn.master.http.ssl.keystore.password=xxxxxxx
image image

@turboFei turboFei changed the title [CELEBORN-1609] Support HTTP SSL connection [CELEBORN-1609] Support SSL for celeborn RESTful service Sep 21, 2024
@turboFei
Copy link
Member Author

private def setCelebornOpenAPIDefinition(openApi: OpenAPI, requestBaseUri: URI): OpenAPI = {
val httpScheme = if (httpService.httpSslEnabled()) "https:" else "http:"
val requestBaseUrl = s"$httpScheme${requestBaseUri.getSchemeSpecificPart}"
val apiUrls = List(requestBaseUrl, s"$httpScheme//${httpService.connectionUrl}/").distinct
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To fix the swagger request url scheme inconsistent when SSL enabled.
image

Copy link
Member Author

@turboFei turboFei Sep 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scala> val uri = new java.net.URI("https://celeborn.vip.com:9098/")
val uri: java.net.URI = https://celeborn.vip.com:9098/

scala> uri.getSchemeSpecificPart
val res0: String = //celeborn.vip.com:9098/

scala> "https:" + uri.getSchemeSpecificPart
val res1: String = https://celeborn.vip.com:9098/

scala> 


scala> 

Copy link
Contributor

@RexXiong RexXiong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RexXiong RexXiong closed this in b2aa359 Sep 25, 2024
@RexXiong
Copy link
Contributor

Thanks. merge to main(v0.6.0)

@turboFei turboFei deleted the HADP_1609_ssl2 branch September 25, 2024 03:25
HolyLow pushed a commit to HolyLow/celeborn that referenced this pull request Oct 14, 2024
### What changes were proposed in this pull request?
Support SSL for celeborn RESTful service.

### Why are the changes needed?
For HTTP SSL connection requirements.

### Does this PR introduce _any_ user-facing change?
No, SSL is disabled by defaults.

### How was this patch tested?

Integration testing.

```
celeborn.master.http.ssl.enabled=true
celeborn.master.http.ssl.keystore.path=/hadoop/keystore.jks
celeborn.master.http.ssl.keystore.password=xxxxxxx
```
<img width="1143" alt="image" src="https://github.com/user-attachments/assets/2334561d-1de3-4b38-bc80-5d5d86d3b8ff">

<img width="695" alt="image" src="https://github.com/user-attachments/assets/e3877468-cc3b-4a4a-bf75-2994f557a104">

Closes apache#2756 from turboFei/HADP_1609_ssl2.

Authored-by: Wang, Fei <fwang12@ebay.com>
Signed-off-by: Shuang <lvshuang.xjs@alibaba-inc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants