jscas / jscas-server

28 stars 6 forks source link

Is there a way to fitler the servers that can obtain credentials from jscas-server? #10

Open leaf-node opened 6 years ago

leaf-node commented 6 years ago

I suspect that https://github.com/jscas/jscas-server/blob/master/lib/plugins/jsServiceRegistry/index.js might have to do with it, but I'm not sure.

What I'm looking to do is to filter clients based on a set of IP address ranges. We tend to add and remove servers with CAS clients on a regular basis, so an IP range fitler would make the most sense for that use case. Is this supported by jscas-server as is?

Thanks! : D

jsumners commented 6 years ago

You have a couple options. The easiest would be to filter the requests at your proxy server, e.g. HAProxy. But typically a CAS server filters access by service URL. In that case, the production ready https://github.com/jscas/jscas-pg-registries will suit your needs. However, if you need a registry that supports limiting queries by IP address, you will need to write your own registry plugin.

The plugins included in the base install, i.e. npm install jscas-server, are not meant for production use. This is very clearly stated in the readme.