Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import jakarta.annotation.Nonnull;
import org.apache.polaris.core.PolarisCallContext;
import org.apache.polaris.core.persistence.dao.entity.PrincipalSecretsResult;
import software.amazon.awssdk.annotations.NotNull;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

wrong import


/** Manages secrets for Polaris principals. */
public interface PolarisSecretsManager {
Expand Down Expand Up @@ -74,7 +73,7 @@ PrincipalSecretsResult rotatePrincipalSecrets(
PrincipalSecretsResult resetPrincipalSecrets(
@Nonnull PolarisCallContext callCtx,
long principalId,
@NotNull String resolvedClientId,
@Nonnull String resolvedClientId,
String customClientSecret);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
import com.google.common.base.Strings;
import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotNull;
import jakarta.enterprise.context.RequestScoped;
import jakarta.inject.Inject;
import jakarta.ws.rs.core.SecurityContext;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -135,6 +136,7 @@
* provide different implementations of PolarisEntityManager to abstract away the implementation of
* the persistence layer.
*/
@RequestScoped
public class PolarisAdminService {
private static final Logger LOGGER = LoggerFactory.getLogger(PolarisAdminService.class);

Expand All @@ -151,15 +153,16 @@ public class PolarisAdminService {
// Initialized in the authorize methods.
private PolarisResolutionManifest resolutionManifest = null;

@Inject
public PolarisAdminService(
@NotNull PolarisDiagnostics diagnostics,
@NotNull CallContext callContext,
@NotNull ResolutionManifestFactory resolutionManifestFactory,
@NotNull PolarisMetaStoreManager metaStoreManager,
@NotNull UserSecretsManager userSecretsManager,
@NotNull SecurityContext securityContext,
@NotNull PolarisAuthorizer authorizer,
@NotNull ReservedProperties reservedProperties) {
@Nonnull PolarisDiagnostics diagnostics,
@Nonnull CallContext callContext,
@Nonnull ResolutionManifestFactory resolutionManifestFactory,
@Nonnull PolarisMetaStoreManager metaStoreManager,
@Nonnull UserSecretsManager userSecretsManager,
@Nonnull SecurityContext securityContext,
@Nonnull PolarisAuthorizer authorizer,
@Nonnull ReservedProperties reservedProperties) {
this.callContext = callContext;
this.realmConfig = callContext.getRealmConfig();
this.resolutionManifestFactory = resolutionManifestFactory;
Expand Down Expand Up @@ -700,7 +703,7 @@ private Map<String, SecretReference> extractSecretReferences(
* @see #extractSecretReferences
*/
private boolean requiresSecretReferenceExtraction(
@NotNull ConnectionConfigInfo connectionConfigInfo) {
@Nonnull ConnectionConfigInfo connectionConfigInfo) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

needed to be changed as quarkus thought this might be a rest endpoint or the like, quite sure Nonnull was the original intent (i.e. not validation here)

return connectionConfigInfo.getAuthenticationParameters().getAuthenticationType()
!= AuthenticationParameters.AuthenticationTypeEnum.IMPLICIT;
}
Expand Down
Loading