After some effort I could bring up the key server , prosody with required modules but I get the error below while accessing meeting with the token.
muc.test.mydomain.com:muc_domain_mapper warn Session filters applied
mod_bosh info New BOSH session, assigned it sid ‘5f7ea9d7-135c-4421-a26b-98cc5a3989a1’ test.mydomain.com:auth_token warn Error on public key request: Code 0, Content certificate-chain-invalid
general warn Error verifying token err:not-allowed, reason:could not obtain public key
jcp564a103d3be0 info Incoming Jabber component connection
and renamed my pub key to sha256 name .pem ( something like ba7816bf8f01cfea414140de5dae2223b00361a39617.pem)
Now the error is as below.
warn Error on public key request: Code 0, Content certificate-chain-invalid
general warn Error verifying token err:not-allowed, reason:could not obtain public key
Copy the public side to a web-accessible URL like: https://keyserver.example.com/keys/a321cebb1ff30c9dd8f1f775c7fbcb16784bbee6403e42e1d069ce58062468db.pem
Configure prosody to look for keys in this location via prosody.cfg.lua or other files (with indentation fixes I cannot seem to get right here, replace the periods with spaces in the asap_keyserver line):
warn Error on public key request: Code 0, Content certificate-chain-invalid
general warn Error verifying token err:not-allowed, reason:could not obtain public key
^C
If the error is that you could not obtain the public key, then I would study the ‘kid’ field and ensure that you have the SHA256 correct. Ensure you have no newlines or any other whitespace when calculating this value, it should be just the SHA256 of the ‘kid’ field. Then ensure you can fetch this key from the URL you specify with no other configuration. Be sure the server doesn’t require SNI for its SSL access, as the lua http code currently doesn’t support this.
Then the next step is to ensure you can actually fetch the key from your URL without using SNI. If you have the ability to temporarily use http instead of https, I suggest trying that and seeing if it fixes the issue. If so, then your host may require SNI for SSL (sites such as custom hostnames for AWS cloudfront require SNI, some shared hosts do too). If that’s the case, you may need to set up a proxy on nginx on the same host and then fetch keys through that proxy. This isn’t by default supported in the container setup, so it’s going a little far afield for this feature.