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

API Revisions #34

Merged
merged 5 commits into from
Nov 11, 2024
Merged

API Revisions #34

merged 5 commits into from
Nov 11, 2024

Conversation

ronenh
Copy link
Contributor

@ronenh ronenh commented Nov 8, 2024

This PR includes breaking changes! It would be a minor version bump.o

  • Remove SessionID
  • Remove DialOptionsProvider and roll its functionality into ConnectionOptions.
  • Embed Config in ConnectionOptions to eliminate duplication.
  • Consolidate the logic that creates gRPC dial options into ConnectionOptions.
  • Support mTLS using WithClientCert().
  • Support WithAccountID and its equivalent config option.
  • Support WithNoTLS and its equivalent config option.

@ronenh ronenh requested a review from gertd November 8, 2024 22:47
config.go Outdated
// An Aserto tenant ID.
TenantID string `json:"tenant_id"`

// An aserto account ID.
Copy link
Member

Choose a reason for hiding this comment

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

Aserto (uppercase)

@@ -36,7 +36,7 @@ func New(opts ...aserto.ConnectionOption) (*Client, error) {
return nil, err
}

if options.ServerAddress() == "" {
if options.Address == "" {
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need to v2 directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. I'll get rid of it.

config.go Outdated
return nil, errors.Wrap(ErrInvalidConfig, "api_key and token are mutually exclusive")
}

if cfg.Insecure && cfg.NoTLS {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need a mutually exclusive check for mTLS and (insecure | NoTLS)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch!

Copy link
Member

@gertd gertd left a comment

Choose a reason for hiding this comment

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

See comments inline

  • Need for directory v2, I would propose removing it, as topaz 32 no longer supports, and this go-aserto release will be a major version rev.
  • Need for mTLS mutually exclusive check with Insecure or NoTLS

@ronenh ronenh marked this pull request as ready for review November 9, 2024 00:09
@ronenh ronenh merged commit 9d9fc37 into main Nov 11, 2024
4 checks passed
@ronenh ronenh deleted the vnext branch November 11, 2024 16:45
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