Fork me on GitHub
#xtdb
<
2023-04-24
>
Namit Shah03:04:35

I am using JDBC for documents and transactions and RocksDB for indexes. I want to start two nodes which uses the same JDBC database. When I am starting another node, I am getting the following error,

Execution error (BindException) at  (Net.java:-2).
Address already in use
Any idea what might be the issue?

tatut04:04:24

2 nodes on the same machine?

Namit Shah04:04:07

Wanted to test it in the local system. The plan is to have two services which starts a node and will use JDBC (a common RDS instance for storing docs and txns). Is there any way to do that or I am not understanding something and this questions is dumb 😅

tatut04:04:51

I don’t think XTDB itself is starting listening ports, so perhaps you have some other network listeners in the same app?

tatut04:04:02

or you are using the http-server module, that starts a listener

Namit Shah04:04:45

I found the issue. There was an conflict in the nREPL port. I am sorry for asking this question. Thank you so much for the help 🙂

❤️ 2
rickheere13:04:38

Wow the websites looks so fancy now! Well done.

nice 8
Xiaomin Wang17:04:04

Hi, is there any guidance on how to secure xtdb? The only thing I found was jwks in https://docs.xtdb.com/extensions/http/#_parameters. does that work with okta? does xtdb verify incoming requests for authorization headers? or do we need to implement our own authentication system? Thanks in advance!!

malcolmsparks17:04:43

There is no explicit support for authentication in XTDB. If you only want to restrict access the database by role, you might do that with a web gateway. If you want more fine grained access control depending on the subject, that is something that is application specific. That said, we do have a project at https://github.com/juxt-site/site that demonstrates an authentication and authorization system on XTDB. Do feel free to DM me if you want more details and to discuss further. Or email me at <mailto:[email protected]|[email protected]>

🙏 2
gratitude-thank-you 2
👀 2
refset17:04:10

Another relevant point on security is the predicate allowlist: https://docs.xtdb.com/administration/configuring/#fn-allowlist

gratitude-thank-you 2
Xiaomin Wang20:04:57

Thanks for the pointers! are you guys saying jwks doesn’t work? or it’s for something other than authentication?

refset20:04:49

Ah sorry I skimmed the messages too quickly! I think out jwks config at least should work for basic global-level authentication. We've not found many opportunities to use it much ourselves in the time since we implemented it, but if it doesn't work for your needs then we can perhaps fix it 🙂 There are some tests which demonstrate working usage: https://github.com/xtdb/xtdb/blob/c7b237ebcca9868531b9e59b83353b760f3afd7c/modules/http-client/test/xtdb/remote_api_client_test.clj#L18

Xiaomin Wang20:04:49

@U899JBRPF thanks! global-level auth is all i need for now! i take from the docs that jwks is expecting a json string? an example would be really helpful. but i can try stuff out if there isn’t an example

👌 2
Xiaomin Wang20:04:39

thank you so much!!

🙌 2