adutra commented on code in PR #469:
URL: https://github.com/apache/polaris/pull/469#discussion_r1895962484


##########
dropwizard/service/src/main/resources/application.properties:
##########
@@ -0,0 +1,158 @@
+#
+# 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.
+#
+
+quarkus.application.name=Apache Polaris (incubating)
+quarkus.banner.path=/org/apache/polaris/service/banner.txt
+
+quarkus.config.mapping.validate-unknown=true
+
+quarkus.container-image.build=false
+quarkus.container-image.push=false
+# quarkus.container-image.registry=ghcr.io
+quarkus.container-image.group=apache
+quarkus.container-image.name=polaris
+# quarkus.container-image.tag=latest
+
+# multi-architecture builds require pushing to a registry
+# quarkus.docker.buildx.platform=linux/amd64,linux/arm64
+
+quarkus.http.auth.basic=false
+quarkus.http.access-log.enabled=true
+# quarkus.http.access-log.pattern=common
+quarkus.http.enable-compression=true
+quarkus.http.enable-decompression=true
+quarkus.http.body.handle-file-uploads=false
+quarkus.http.limits.max-body-size=10240K
+quarkus.http.compress-media-types=application/json,text/html,text/plain
+
+quarkus.http.cors.origins=http://localhost:8080
+quarkus.http.cors.methods=PATCH, POST, DELETE, GET, PUT
+quarkus.http.cors.headers=*
+quarkus.http.cors.exposed-headers=*
+quarkus.http.cors.access-control-max-age=PT10M
+quarkus.http.cors.access-control-allow-credentials=true
+
+quarkus.http.port=8181
+quarkus.http.test-port=0
+
+quarkus.log.level=INFO
+quarkus.log.console.enable=true
+quarkus.log.console.level=ALL
+quarkus.log.console.json=false
+quarkus.log.console.format=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c{3.}] 
[%X{requestId},%X{realmId}] [%X{traceId},%X{parentId},%X{spanId},%X{sampled}] 
(%t) %s%e%n
+quarkus.log.file.enable=true
+quarkus.log.file.level=ALL
+quarkus.log.file.json=false
+quarkus.log.file.format=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c{3.}] 
[%X{requestId},%X{realmId}] [%X{traceId},%X{parentId},%X{spanId},%X{sampled}] 
(%t) %s%e%n
+quarkus.log.file.path=./logs/polaris.log
+quarkus.log.file.rotation.file-suffix=.yyyy-MM-dd.gz
+quarkus.log.file.rotation.max-file-size=10M
+quarkus.log.file.rotation.max-backup-index=14
+quarkus.log.category."org.apache.polaris".level=INFO
+quarkus.log.category."org.apache.iceberg.rest".level=INFO
+quarkus.log.category."io.smallrye.config".level=INFO
+
+quarkus.management.enabled=true
+quarkus.management.port=8182
+quarkus.management.test-port=0
+
+quarkus.micrometer.enabled=true
+quarkus.micrometer.export.prometheus.enabled=true
+
+quarkus.otel.enabled=true
+quarkus.otel.sdk.disabled=false
+# quarkus.otel.exporter.otlp.endpoint=http://otlp-collector:4317
+# quarkus.otel.resource.attributes=deployment.environment=dev
+# quarkus.otel.service.name=polaris
+# quarkus.otel.traces.sampler=parentbased_always_on
+# quarkus.otel.traces.sampler.arg=1.0d
+
+polaris.context.realm-context-resolver.default-realm=default-realm
+polaris.context.realm-context-resolver.type=default
+
+polaris.config.defaults.ENFORCE_PRINCIPAL_CREDENTIAL_ROTATION_REQUIRED_CHECKING=false
+polaris.config.defaults.SUPPORTED_CATALOG_STORAGE_TYPES=["S3","GCS","AZURE","FILE"]
+# realm overrides
+# 
polaris.config.realm-overrides."my-realm".INITIALIZE_DEFAULT_CATALOG_FILEIO_FOR_TEST=true
+# 
polaris.config.realm-overrides."my-realm".SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION=true
+
+polaris.persistence.metastore-manager.type=in-memory
+
+polaris.io.file-io-factory.type=default
+
+polaris.log.request-id-header-name=request_id
+# polaris.log.mdc.aid=polaris
+# polaris.log.mdc.sid=polaris-service
+
+polaris.metrics.tags.application=Polaris
+# polaris.metrics.tags.service=polaris
+# polaris.metrics.tags.environment=prod
+# polaris.metrics.tags.region=us-west-2
+
+# polaris.otel.span-attributes.service=polaris
+# polaris.otel.span-attributes.environment=prod
+# polaris.otel.span-attributes.region=us-west-2
+
+# polaris.tasks.max-concurrent-tasks=100
+# polaris.tasks.max-queued-tasks=1000
+
+polaris.rate-limiter.type=default
+polaris.rate-limiter.token-bucket.type=default
+polaris.rate-limiter.token-bucket.requests-per-second=9999
+polaris.rate-limiter.token-bucket.window=PT10S
+
+polaris.authentication.type=default
+polaris.authentication.oauth2-service.type=default
+polaris.authentication.token-broker-factory.type=rsa-key-pair

Review Comment:
   You are right, I forgot that there is this special handling in 
`PolarisApplicationConfig`:
   
   
https://github.com/apache/polaris/blob/1071aa24d2c2bad3ff0f9840a6b2572bc29e4e6a/dropwizard/service/src/main/java/org/apache/polaris/service/dropwizard/config/PolarisApplicationConfig.java#L242-L269
   
   That said, in `main` the default authenticator is the "test" one, but I 
don't think we want to keep that one as the default authenticator going forward 
(or do we?).
   
   Taking a step back, I think we want to 1) have good defaults for security 
and 2) have a default setup that starts up without errors.
   
   The thig is, I'm not sure the "no-op" token broker with the "default" 
authenticator make a good pair; I'm getting the below error:
   
   ```
   {"error":"unsupported_grant_type","error_description":"The grant type is 
invalid","error_uri":null}
   ```
   
   I suggest a slightly better combination: "default" authenticator + 
"symmetric-key" token broker with a default secret of `changeme`. WDYT?
   
   Another option, of course, would be to keep the "test" authenticator as the 
default one.



-- 
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]

Reply via email to