Separation of SMP api path #259
Replies: 6 comments 6 replies
-
So I converted it to a discussion. The main problem with the Peppol SMP API atm is, that it requires API queries starting from the root path as in Imho not exposing the following elements to the Internet should do the trick:
And consider the configuration properties mentioned on https://github.com/phax/phoss-smp/wiki/Security P.S. Future versions of the SMP have a fixed query path prefix that can be used to whitelist public get access |
Beta Was this translation helpful? Give feedback.
-
Thanks for your prompt reply and your insight.
The thing is that this solves only part of the issue. Since it's a senstive project, imho the ideal security principles would be the following 2:
Having this in mind, an ideal setup would be
The above setup would be straightforward to setup in apache, if I had the option to create the /smp and /smp-api paths It's not completely impossible to setup this now, but it's a bit painful and error-prone. |
Beta Was this translation helpful? Give feedback.
-
We run two instances like this. The "public" instance has a custom (cleaned) web.xml that only has the relevant servlets in addition to the reverse proxy only allowing GETs. |
Beta Was this translation helpful? Give feedback.
-
Yeah you are right. I meant critical. Please have in mind that there is a high possibility that SMP may run on the same machine with AP, thus some strict security policies may apply. In this case, I would have a hard time to explain to ISO27001 inspection why we allow http access
I thought about that, though it seems a bit overkill. Thanks a lot for your suggestions, however please have this issue in mind. I think that an optional clear-cut separation of administration from http smp requests in the future, would be a happy improvement. Thanks |
Beta Was this translation helpful? Give feedback.
-
Perhaps the XML backend could be reworked to use memcached. You can run this either locally or shared. The "write" app (still a single instance with XML on disk) CUDs the memcached, the "read" app reads from memcached instead of from memory. Just as fast and more scalable. |
Beta Was this translation helpful? Give feedback.
-
I read everything and some things still confused me. If I block public access to /secure/* will it block also the api to the login or only the UI that is served on secure ? Thanks |
Beta Was this translation helpful? Give feedback.
-
Hello
I would love to separate the UI and the modification API from the basic SMP rest api which should be publicly available.
Ideally, I would like to expose only the SMP api behind an apache http/80 reverse proxy, and everything else allowed only through https and accessed only by specific IPs.
It's our common practice to minimize the exposed surface to the public internet as much as possible.
In https://github.com/phax/phoss-smp/wiki/Security is not quite obvious what is the minimum required to be publicly available.
Moreover in order to achieve this, it seems that I would have to create a bit complicated proxy configuration that it's prone to future changes or unintended exposure if the paths are changed in the future.
In a perfect world, I would like to have the option to have all the SMP read only access under a separate path instead of root. This arrangement would make my proxy security configuration much easier to enforce https and other security rules in everything else that may not need to be publicly available.
Could you advise if there's a way to configure the SMP API in this manner, or if there are any existing options or workarounds that we might consider?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions