sebadob/rauthy

Take api prefix as config.

damooo opened this issue · 5 comments

Currently auth/v1/ prefix is hardcoded into rauthy. Instead it would be valuble, if we take prefix from config instead.

Thus service owners can choose it to be no-prefix, (if they have scoped at subdomain level like auth.ex.org), or custom prefix like accounts/v1/ (as in google apis for eg.)

This would need a very, very big PR which will take lots of time and I don't plan on doing this. This would take several hours at least to get it right because it is used like that in so many places.

Additionally, I don't see any real value for this. Rauthy has redirections to the login page from / and from /auth, if you just want to use it with its own sub domain instead of merging it into an existing application via reverse proxy. At the moment, you can deploy it both ways and both will work.

I am not even sure if this would work at all, most probably not. The whole frontend is pre-compiled into static HTML files to be as efficient as possible and you would need to resolve all links in each an every pre-compiled HTML at runtime.

Another thing is that you have to mention this in all docs in the future and people will start asking questions and stuff why their link is not working and so on.

Having this as a dynamic prefix is a total waste of resources and does not provide any real benefit imho.

If you really want to change the base path, you are able to do this with a reverse proxy URL rewrite in front.

Yes. I have a thought that, we can just remove any prefix at all. They can just configure the mount point, instead of fighting with rauthy. This is the best way i feel, as we need not to make any arbitrary prefix as default.

Most of existing frameworks configure that way. They just take the base_url as single config, and appends from there on.

Yes true, but since Rauthy is used a lot in conjunction with other Apps and it just provides authn/authz, I have chosen /auth as base path. Keycloak does (or at least did) it the same. This just makes any possible reverse proxy faster and more efficient.