AbsaOSS / AbsaOSS/ABRiS

Abris not working when used with confluent schema registry over basic auth (found on dataproc)

Đang mở
#364 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Scala
Star
242
Fork
84
Merge trung bình
10 giờ 12 phút
Pull request đã merge (30 ngày)
2

Mô tả

This is an issue with confluent-schema-registry-client though but getting extended to Abris. The issue is, when schema registry is being used with basic auth over a confluent instance, it is showing 401 while fetching schema from confluent (incase of dataproc cluster over a private VPN). One can not just pass credentials like following:

```
AbrisConfig.fromConfluentAvro.downloadReaderSchemaByLatestVersion
.andTopicNameStrategy(getTopic)
.usingSchemaRegistry(
Map(
AbrisConfig.SCHEMA_REGISTRY_URL -> Configuration.schemaRegistryUrl,
SchemaRegistryClientConfig.BASIC_AUTH_CREDENTIALS_SOURCE -> "USER_INFO",
SchemaRegistryClientConfig.USER_INFO_CONFIG -> s"${Configuration.schemaRegistryUsername}:${Configuration.schemaRegistryPassword}"
)
)
```
instead confluent can give you schema if used with a rest service created and passed through. e.g.

```
val restService = new RestService(urls)
val provider = new UserInfoCredentialProvider()
provider.configure(configs.asJava)
restService.setBasicAuthCredentialProvider(provider)
new CachedSchemaRegistryClient(restService, maxSchemaObject)
```

The current implementation of this is not allowing to use restService based constructor with `CachedSchemaRegistryClient`, so I have tried changing Abris code and made a separate jar with above change. Raising a PR to add this feature.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.