dennishuo commented on code in PR #2759: URL: https://github.com/apache/polaris/pull/2759#discussion_r2415140965
########## polaris-core/src/main/java/org/apache/polaris/core/credentials/connection/CatalogAccessProperty.java: ########## @@ -0,0 +1,66 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.polaris.core.credentials.connection; + +import org.apache.iceberg.aws.AwsProperties; + +/** + * A subset of Iceberg catalog properties recognized by Polaris. + * + * <p>Most of these properties are meant to initialize Catalog objects for accessing the remote + * Catalog service. + */ +public enum CatalogAccessProperty { + AWS_ACCESS_KEY_ID(String.class, AwsProperties.REST_ACCESS_KEY_ID, "the aws access key id", true), + AWS_SECRET_ACCESS_KEY( + String.class, AwsProperties.REST_SECRET_ACCESS_KEY, "the aws access key secret", true), + AWS_SESSION_TOKEN( + String.class, AwsProperties.REST_SESSION_TOKEN, "the aws scoped access token", true), + EXPIRATION_TIME( Review Comment: Would we end up using the same `expiration-time` between different auth types in the future? I recall `StorageAccessProperty.EXPIRATION_TIME` being more of the deprecated field, where we prefer `AWS_SESSION_TOKEN_EXPIRES_AT_MS` to be more specific about what it is. That one also has the `s3` prefix: `s3.session-token-expires-at-ms`. Is there ever a situation where we might need to put an S3 credential into the same config map as a sigv4 catalog-connection credential? In that case we'd need separate expiration times as well if they're not in separate tuples. Following the same convention of the `rest.` prefix used in `AwsProperties`, we'd then want this to be `rest.session-token-expires-at-ms`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
