-
Notifications
You must be signed in to change notification settings - Fork 206
DOC-4990 AMR connection page for Go #1605
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks @dwdougherty ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andy-stark-redis I am leaving some suggestions as a first review of this page. Ping me to do a final one when you review the suggestions.
content/develop/clients/go/amr.md
Outdated
clientID := os.Getenv("AZURE_CLIENT_ID") | ||
redisEndpoint := os.Getenv("REDIS_ENDPOINT") | ||
if clientID == "" || redisEndpoint == "" { | ||
log.Fatal( | ||
"AZURE_CLIENT_ID and REDIS_ENDPOINT env variables are required" | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
client id is not needed for system assigned identity provider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Co-authored-by: Nedyalko Dyakov <1547186+ndyakov@users.noreply.github.com>
@ndyakov Thanks for the review. I've implemented your suggestions - please let me know if there's anything else that needs to be changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me, one examples should be fixed and I do think the options
example can benefit from additional code to show where the options
should be plugged.
. | ||
. | ||
provider, err := entraid.NewConfidentialCredentialsProvider( | ||
entraid.ConfidentialIdentityProviderOptions{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
entraid.ConfidentialIdentityProviderOptions{ | |
entraid.ConfidentialCredentialsProviderOptions{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, probably mistyped this in the last review.
}, | ||
} | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andy-stark-redis do you think it will be beneficial to have a complete example on where those options are supposed to be passed?
For example, just after initiating this options
variable, have something like :
provider, err := entraid.NewManagedIdentityCredentialsProvider(
entraid.ManagedIdentityCredentialsProviderOptions{
CredentialsProviderOptions: options,
ManagedIdentityProviderOptions: identity.ManagedIdentityProviderOptions{
ManagedIdentityType: identity.UserAssignedObjectID,
UserAssignedObjectID: "<your-user-assigned-client-id>",
},
},
)
DOC-4990
This (hopefully) gives Go about the same level of detail as the Jedis AMR docs.
All feedback is welcome, but a few things to note:
AuthorityTypeMultiTenant
= "multi-tenant") but let me know if it's better not to do this.