cuddly-jelly-27016
05/27/2025, 12:09 AMadminServer:
security:
secure: true
ssl:
certificateFile: "/etc/tls/tls.crt"
keyFile: "/etc/tls/tls.key"
useAuth: false
allowCors: true
allowedOrigins:
- 'http://localhost:8088'
- 'https://localhost:8088'
allowedHeaders:
- "Content-Type"
- "flyte-authorization"
Console configmap:
console:
BASE_URL: /console
CONFIG_DIR: /etc/flyte/config
ADMIN_API_URL: https://localhost:8089
ADMIN_API_USE_SSL: https
CERTIFICATE_PATH: /etc/tls # doesn't change anything
I also edited the console deployment manually to mount the key and certificate because I didn't find another way to do it. I mounted the files on /scripts/certificate after finding in the console application code where it looks for it. The CERTIFICATE_PATH variable above doesn't affect the behavior.
Now I'm able to access the console on https//localhost8088 and the admin API on https//localhost8089 (both insecure). But the console gets a CORS error when doing requests to the admin API:
Access to XMLHttpRequest at 'https://locahost:8089/api/v1/projects' from origin 'https://localhost:8088' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Given the admin configuration for CORS, why would I still get a CORS error?
These are the headers on the response:
content-length: 388
content-type: application/octet-stream
date: Tue, 01 Oct 2024 13:24:28 GMT
grpc-metadata-content-type: application/grpc
grpc-metadata-trailer: Grpc-Status
grpc-metadata-trailer: Grpc-Message
grpc-metadata-trailer: Grpc-Status-Details-Bin
I'm not experienced with web applications, so a noob question: should be an Access-Control-Allow-Origin header in the response headers?
Suppose I resolve this CORS error, can the console make https requests without verifying the admin API certificate? How do I configure it to skip certificate verification?
### Expected behavior
Enable SSL with self signed certificated
### Additional context to reproduce
No response
### Screenshots
No response
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
05/27/2025, 12:09 AM