Skip to content
Open
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 @@ -18,11 +18,9 @@
*/
package org.apache.polaris.admintool.nosql;

import jakarta.inject.Inject;
import org.apache.polaris.admintool.nosql.maintenance.NoSqlMaintenanceInfoCommand;
import org.apache.polaris.admintool.nosql.maintenance.NoSqlMaintenanceLogCommand;
import org.apache.polaris.admintool.nosql.maintenance.NoSqlMaintenanceRunCommand;
import org.apache.polaris.persistence.nosql.api.backend.Backend;
import picocli.CommandLine;

@CommandLine.Command(
Expand All @@ -35,8 +33,6 @@
mixinStandardHelpOptions = true,
description = "Sub-commands specific to NoSQL persistence.")
public class NoSqlCommand extends BaseNoSqlCommand {
@Inject protected Backend backend;

@Override
public Integer call() {
printNoSqlInfo();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,21 +427,6 @@ public LoadTableResponse createTableDirect(Namespace namespace, CreateTableReque
namespace, request, EnumSet.noneOf(AccessDelegationMode.class), Optional.empty());
}

/**
* Create a table.
*
* @param namespace the namespace to create the table in
* @param request the table creation request
* @return ETagged {@link LoadTableResponse} to uniquely identify the table metadata
*/
public LoadTableResponse createTableDirectWithWriteDelegation(
Namespace namespace,
CreateTableRequest request,
Optional<String> refreshCredentialsEndpoint) {
return createTableDirect(
namespace, request, EnumSet.of(VENDED_CREDENTIALS), refreshCredentialsEndpoint);
}

public void authorizeCreateTableDirect(
Namespace namespace, CreateTableRequest request, boolean delegationRequested) {
if (delegationRequested) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
package org.apache.polaris.service.catalog.iceberg;

import static org.apache.polaris.service.catalog.AccessDelegationMode.VENDED_CREDENTIALS;

import com.google.common.collect.ImmutableMap;
import jakarta.inject.Inject;
import java.time.Instant;
Expand Down Expand Up @@ -469,8 +471,11 @@ Stream<DynamicNode> testCreateTableDirectWithWriteDelegationPrivileges() {
.action(
() ->
newHandler(Set.of(PRINCIPAL_ROLE1))
.createTableDirectWithWriteDelegation(
NS2, createDirectWithWriteDelegationRequest, Optional.empty()))
.createTableDirect(
NS2,
createDirectWithWriteDelegationRequest,
EnumSet.of(VENDED_CREDENTIALS),
Optional.empty()))
.cleanupAction(() -> newHandler(Set.of(PRINCIPAL_ROLE2)).dropTableWithPurge(newtable))
.shouldPassWith(PolarisPrivilege.TABLE_CREATE, PolarisPrivilege.TABLE_WRITE_DATA)
.shouldPassWith(PolarisPrivilege.CATALOG_MANAGE_CONTENT)
Expand Down