Applying Access Restrictions to Unnecessary Request Handlers (endpoints) with BTP

A Mendix app offers various endpoints that can be used to obtain information about offered services. The paths used by these endpoints end in -doc.  How can we apply access restrictons using the business technology platform. In mendix cloud you can do this within the Developer Portal. They can be found in the Environment details of your cloud node. In the BTP there is no such option available. How can we restrict access?  
1 answers


I have never tested this, so this is a bit of an educated guess:

You can configure custom environment variables (on the Runtime tab) from the mendix BTP portal. If you configure ‘ACCESS_RESTRICTIONS’ there, it could be picked up by the mendix cf buildpack, where you can also find some documentation.

    # {
    #     "/": {'ipfilter': [''], 'client_cert': true, 'satisfy': 'any'},
    #     "/ws/MyWebService/": {'ipfilter': [''], 'client_cert': true, 'satisfy': 'all'},
    #     "/CustomRequestHandler/": {'ipfilter': ['']},
    #     "/CustomRequestHandler2/": {'basic_auth': {'user1': 'password', 'user2': 'password2'}},
    # }

Let us know if this works, regards Fabian