Skip to content

Event Hubs Java RBAC#3753

Closed
JamesBirdsall wants to merge 25 commits into
Azure:masterfrom
JamesBirdsall:jbird.rbac
Closed

Event Hubs Java RBAC#3753
JamesBirdsall wants to merge 25 commits into
Azure:masterfrom
JamesBirdsall:jbird.rbac

Conversation

@JamesBirdsall

Copy link
Copy Markdown
Contributor

This is in-progress work on RBAC support for the Event Hubs Java SDK. PR exists to let people conveniently review the changes.

@azuresdkci

Copy link
Copy Markdown
Contributor

Can one of the admins verify this patch?

public class ManagedIdentityTokenProvider implements ITokenProvider {
@Override
public CompletableFuture<SecurityToken> getToken(final String resource, final Duration timeout) {
final MSICredentials credentials = new MSICredentials();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

credentials [](start = 26, length = 11)

static

});
}

public interface AuthenticationCallback {

@bainian12345 bainian12345 Jun 10, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

interface [](start = 11, length = 9)

Can this possibly be a @FunctionalInterface?

}, executor);
}

public static CompletableFuture<EventHubClient> create(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

public static CompletableFuture create( [](start = 4, length = 55)

Do we need to make this public since we removed Create API on the client?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

EventHubClient and EventHubClientImpl are in separate packages. If the creates on Impl are not public, then EventHubClient can't call them.

import com.microsoft.azure.eventhubs.impl.ClientConstants;

public class ManagedIdentityTokenProvider implements ITokenProvider {
final static MSICredentials credentials = new MSICredentials();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That won't support:

@JamesBirdsall JamesBirdsall changed the title DO NOT MERGE Event Hubs Java RBAC review Event Hubs Java RBAC Jun 28, 2019
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We try to add new dependencies in parent pom.xml files so that versions are consistent between client libraries. You would add it here:
https://github.com/Azure/azure-sdk-for-java/blob/master/parent/pom.xml

@JonathanGiles Is this the correct place to define new dependencies? I tried to find gson in it, but doesn't look like it is declared there.

@JamesBirdsall

Copy link
Copy Markdown
Contributor Author

Git could not recover this PR after the reorganization into the sdk directory. Replaced by #4498.

@JamesBirdsall
JamesBirdsall deleted the jbird.rbac branch August 30, 2019 00:49
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.

6 participants