Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): Add connection to optional remote ers #1601

Draft
wants to merge 1 commit into
base: separate-keycloak-ers-implementation
Choose a base branch
from

Conversation

elizabethhealy
Copy link
Member

@elizabethhealy elizabethhealy commented Oct 2, 2024

Adding modeoptions to config

  • allows user to specify certain remoteERSUrl if the ERS is running remotely. can be extended to support more options

Support a separate ers connection in the sdk

  • i thought about have two clients, one for the core platform and one for ers, but then we'd need each the opentdfserver to store multiple sdk clients and the service registration functions to take in multiple sdk clients, it felt like a more invasive change, but idk maybe that's cleaner?

This comment has been minimized.

func getNewGRPCConn(url string) (*grpc.ClientConn, error) {
defaultOptions := []grpc.DialOption{
grpc.WithTransportCredentials(insecure.NewCredentials()),
}
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: support dial options in the yaml config

This comment has been minimized.

1 similar comment
Copy link
Contributor

github-actions bot commented Oct 2, 2024

Warning

This pull request does not reference any issues. Please add a reference to an issue in the body of the pull request description.

Comment on lines +2 to +3
modeoptions:
remoteERSUrl: http://localhost:8181
Copy link
Member

Choose a reason for hiding this comment

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

What are your thoughts if we moved this configuration underneath SDKConfig. Trying to think how we could layer in other options for our internal products as well.

type SDKConfig struct {
// Endpoint is the URL of the Core Platform endpoint.
Endpoint string `mapstructure:"endpoint" json:"endpoint"`
// Plaintext specifies whether the SDK should use plaintext communication.
Plaintext bool `mapstructure:"plaintext" json:"plaintext" default:"false" validate:"boolean"`
// ClientID is the client ID used for client credentials grant.
// It is required together with ClientSecret.
ClientID string `mapstructure:"client_id" json:"client_id" validate:"required_with=ClientSecret"`
// ClientSecret is the client secret used for client credentials grant.
// It is required together with ClientID.
ClientSecret string `mapstructure:"client_secret" json:"client_secret" validate:"required_with=ClientID"`

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