Open kdubovikov opened 9 months ago
Thank you for opening your first issue here! 🛠
🤖
The issue you're experiencing is likely due to the Python requests library, which Flyte uses under the hood, not trusting your self-signed certificates by default.
To resolve this issue, you can set the REQUESTS_CA_BUNDLE
environment variable to the path of your certificate file. This will tell the requests library to trust your self-signed certificate.
Here's how you can do it:
First, find the path to your certificate file. This will depend on your system configuration.
Then, set the REQUESTS_CA_BUNDLE
environment variable to the path of your certificate file. You can do this in your shell before running your Python script, like so:
export REQUESTS_CA_BUNDLE=/path/to/your/certificate.pem
pyflyte run
should work as expected.Please note that this solution assumes that you're using a Unix-like system (like Linux or MacOS). If you're using Windows, the process to set environment variables is a bit different.
Regarding your question about Flyte supporting self-signed certificates for HTTPS GRPC endpoints, yes, it does. This is indicated by the SslOptions
struct in the ServerSecurityOptions
struct within the ServerConfig
struct. The SslOptions
struct has two fields: CertificateFile
and KeyFile
, which are used to specify the paths to the SSL certificate file and key file respectively.
Here is the relevant code:
type ServerSecurityOptions struct {
Secure bool `json:"secure"`
Ssl SslOptions `json:"ssl"`
UseAuth bool `json:"useAuth"`
AuditAccess bool `json:"auditAccess"`
...
}
type SslOptions struct {
CertificateFile string `json:"certificateFile"`
KeyFile string `json:"keyFile"`
}
This means that you can use self-signed certificates by providing the paths to your certificate and key files in the SslOptions
configuration. You can find this in the flyteadmin/pkg/config/config.go file.
I hope this helps! If you have any other questions or need further clarification, feel free to ask.
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
I have tried REQUESTS_CA_BUNDLE proposal, it does not work. And ServerSecurityOptions
looks to be a flyteadmin
configuration option, while it looks like the problem is on pyflyte
client end
Describe the bug
I am using self-signed certificate for exposing HTTPS Flyte GRPC endpoint on a EKS cluster. My certificate request is the following:
I can not use real endpoint in
CN
since it's way larger than 64 symbols.My config is:
Whenever I am trying to run a remote workflow, I get an error:
Expected behavior
Pyflyte runs the workflow on a remote cluster
Additional context to reproduce
No response
Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?