dongjoon-hyun opened a new pull request, #706:
URL: https://github.com/apache/spark-kubernetes-operator/pull/706

   ### What changes were proposed in this pull request?
   
   This PR adds `examples/cluster-with-jws-filter.yaml`, a copy of 
`examples/cluster.yaml`
   that enables `org.apache.spark.ui.JWSFilter` via the following `sparkConf` 
entries:
   
   ```yaml
   spark.ui.filters: "org.apache.spark.ui.JWSFilter"
   spark.master.rest.filters: "org.apache.spark.ui.JWSFilter"
   spark.org.apache.spark.ui.JWSFilter.param.secretKey: 
"VmlzaXQgaHR0cHM6Ly9zcGFyay5hcGFjaGUub3JnIHRvIGRvd25sb2FkIEFwYWNoZSBTcGFyay4="
   ```
   
   ### Why are the changes needed?
   
   To provide an example for securing the Spark UI and Master REST endpoint 
with `JWSFilter`.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Manually test.
   
   **Without Authorization Header**
   ```
   $ curl http://localhost:6066/v1/submissions/readyz
   <html>
   <head>
   <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
   <title>Error 403 Authorization header is missing.</title>
   </head>
   <body><h2>HTTP ERROR 403 Authorization header is missing.</h2>
   <table>
   <tr><th>URI:</th><td>/v1/submissions/readyz</td></tr>
   <tr><th>STATUS:</th><td>403</td></tr>
   <tr><th>MESSAGE:</th><td>Authorization header is missing.</td></tr>
   
<tr><th>SERVLET:</th><td>org.apache.spark.deploy.rest.StandaloneReadyzRequestServlet-2e828cb1</td></tr>
   </table>
   
   </body>
   </html>
   ```
   
   **With Authorization Header**
   ```
   $ curl -H "Authorization: Bearer 
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.4EKWlOkobpaAPR0J4BE0cPQ-ZD1tRQKLZp1vtE7upPw"
 http://localhost:6066/v1/submissions/readyz   
   {
     "action" : "ReadyzResponse",
     "message" : "",
     "serverSparkVersion" : "4.1.2",
     "success" : true
   }%
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to