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)
- Warn users of impact when deleting a view via Fauxton HOT 1
- Potential pattern of ignoring stranded RPC workers HOT 4
- CouchDB Error HOT 7
- nonode@nohost couch file epoch error HOT 3
- Query Server protocol future/stability. HOT 1
- CouchDB fails to start due to unacceptable_rsa_key after upgrading the erlang version HOT 6
- Compiler warnings for OTP 27 HOT 2
- Allow specifying password files instead of cleartext HOT 4
- Clarification on supported versions HOT 7
- couch lru function clause error HOT 3
- `[admins]` config not hashed and updated in local.ini if any config files exist in local.d
- Query exporting only 2ˆ28 documents (data have more) even after setting query limit to 2ˆ29 HOT 1
- Unix domain socket support HOT 1
- Basic Authentication for `_utils` does not work if `require_valid_user_except_for_up` is set HOT 1
- $in and $or too slow for large database (doesn´t use index) HOT 3
- Error loop with system freeze when removing a node from a cluster HOT 4
- core dump, docker official image, export ERL_FLAGS=" -name couchdb " HOT 2
- Too Many Pending Connections HOT 3
- live change feed with limit never completes HOT 3
- Broken changes feeds with descending=true and limit over total
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.