Comments (7)
Hi,
can you paste your JWT token?
from couchdb.
I think it's a decode error for the public key in the config, @big-r81
we don't need the token
from couchdb.
we should catch and rethrow as something more presentable, but the config is wrong.
from couchdb.
4> public_key:pem_decode(BinPEM).
[{'SubjectPublicKeyInfo',<<48,130,2,181,48,130,1,157,2,6,
1,136,80,108,152,219,48,13,6,9,
42,134,72,134,247,13,...>>,
not_encrypted}]
5> [PEMEntry] =public_key:pem_decode(BinPEM).
[{'SubjectPublicKeyInfo',<<48,130,2,181,48,130,1,157,2,6,
1,136,80,108,152,219,48,13,6,9,
42,134,72,134,247,13,...>>,
not_encrypted}]
6> public_key:pem_entry_decode(PEMEntry).
** exception error: no match of right hand side value {error,{asn1,{{wrong_tag,{{expected,6},
{got,2,{2,<<1,136,80,108,152,219>>}}}},
[{'OTP-PUB-KEY',match_tags,2,
[{file,"OTP-PUB-KEY.erl"},{line,23999}]},
{'OTP-PUB-KEY',decode_object_identifier,2,
[{file,"OTP-PUB-KEY.erl"},{line,23557}]},
{'OTP-PUB-KEY',dec_AlgorithmIdentifier,2,
[{file,"OTP-PUB-KEY.erl"},{line,14558}]},
{'OTP-PUB-KEY',dec_SubjectPublicKeyInfo,2,
[{file,"OTP-PUB-KEY.erl"},{line,15014}]},
{'OTP-PUB-KEY',decode,2,
[{file,"OTP-PUB-KEY.erl"},{line,1232}]},
{public_key,der_decode,2,
[{file,"public_key.erl"},{line,358}]},
{public_key,pem_entry_decode,1,
[{file,"public_key.erl"},{line,226}]},
{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,689}]}]}}}
in function public_key:der_decode/2 (public_key.erl, line 362)
in call from public_key:pem_entry_decode/1 (public_key.erl, line 226)
7>
from couchdb.
OK, thanks for confirming that the key config is wrong, I worked out what happened.
I'm using Keycloak and I used the certificate instead of the public key from the realm settings. The cryptic error is probably trying to parse a public key but was given a certificate, i.e. the error {"error":"bad_request","reason":"not an RSA public key"}
is a lot more meaningful as soon as I used -----BEGIN CERTIFICATE-----
instead of -----BEGIN PUBLIC KEY-----
.
It's working now, thanks for your help.
from couchdb.
:)
from couchdb.
yup, error handling is poor here, we'll improve it.
from couchdb.
Related Issues (20)
- No documentation on mem3 options in CouchDB
- Sign out from Admin HOT 5
- Invoking update function when changing document in Fauxton HOT 3
- HTTP call inside validation function in design document? HOT 2
- CouchDB replications cannot be configured with 'heartbeat'
- Slow couchdb after many queries HOT 29
- Add "exp" to mandatory JWT claims HOT 4
- Nouveau trial run observations HOT 3
- Verify CouchDB Installation fails with create view HOT 4
- replicator session auth cannot handle multiple Set-Cookie headers in /_session request HOT 1
- Create new Fauxton release and update couch HOT 1
- Compactor case clause error
- CouchDB 3.3.3 service not starting and going to Pause status HOT 7
- No Release file for Ubuntu 24.04 LTS HOT 1
- Update and fix bug in hyper
- Don't crash with a 500 error on a missing replicator db in _scheduler/docs
- Why do deleted documents appear in the return result of executing the _find command immediately? HOT 8
- PUT /_node/{node-name}/_config/jwt_keys/{key} does not accept valid key HOT 2
- The replication job for couchdb is stucked HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from couchdb.