What does this mean in practice: "Unique application business limit requirements should be enforced by domain models." - owasp

Regarding the OWASP A5:2017-Broken Access Control, what does the the quote in the title mean? Emphasis on "Unique application business limit" -part.

I guess it is saying that add diff type of business requirement in diff domain model. like create subdomain for different business requirement
A large application has business requirement like application has forum then, suppose example.com is domain. and app has forum functionality so create subdomain for forum is forum.example.com . now we can add different role and different access control on forum.

Related

Change RelayState in AD FS

Consider following situation: We're currently in a migration phase where the majority of our users should still be forwarded to the existing application A. Other users that fulfil some certain criteria (let's call them beta-testers) should instead be forwarded to the new application B.
Users reach our AD FS with a POST request that contains the SAMLResponse and the RelayState. The RelayState-parameter tells our AD FS the desired target-application. Up to now it always contains "site A" since the users don't know about site B yet ;-)
I'm wondering if there's a way to dynamically change the process our ADFS determines the target application based on the value of the RelayState-parameter?
So what I'm looking for is a way to somehow modify the RelayState based on a certain claim the user provides. E.g. if the user has a "beta-tester" entry in her role-claim, then our ADFS should forward her to site B instead of site A.
Is there a way to hook into the AD FS procssing pipeline? The only thing I found so far is this article describing how to "inject" a custom authentication method. But that's obvisiously not what I'm looking for.
So could anybody tell me if there are any other extension points I could utilize to achieve what I described above?
Sorry, no - there is no way to dynamically change RelayState.
ADFS is locked down (as it is a security system) and doesn't have extension points.
Could you have two RP during the transition?
One approach is to setup a proxy site where you can apply custom logic as necessary for scenarios like this. My experience is there are numerous times when it's handy to have a point of entry into the federation process, i.e. a psuedo-extension point, where you can apply custom logic. So, everyone from the IdP may go to https://proxy.mysite.com and then that site would make determinations based on claims and maybe querystring, posted variables or header attributes, as to where to send (redirect) the user to next, https://a.mysite.com or https://b.mysite.com.
DNS can also be folded in, to do things like direct https://a.mysite.com to the proxy site and the proxy site can then look at the hostname of the request and know that the user intended to go to a.mysite.com, but you can determine if a beta tester and direct to b.mysite.com or the actual A site.

Multi-tenant with multi-select template SaaS Web Framework

I'm looking for Frameworks that can help me implement an Application working as Weebly or BigCommerce. This mean customer can register their website, choosing their suitable template and start to operate their website. I've searched on the Internet and the results mention about the Multi-tenant and SaaS architecture; however, I'm not sure whether these keywords are what exactly I want to do or not. If i'm going wrong way please let me know how can I implement an Application like some companies I've mentioned above.Thanks!
There are some requirements:
Customers can edit their Website on the Admin Page
CMS and eCommerece, Billing should be intergrated
One source code which can generate approriate website template for customer.

API Endpoint Design : Technical Spec or Product

We have 2 developers who have conflicts in the way to design the RESTful API Endpoint. Basically, let say that we have Facebook product in hand, one table for the posts.
First developer give the opinions that
We should seperate Endpoint by product, not by the technical storage. To be like that, we will have endpoint for user facebook post and other facebook post.
/v1/wall/mypost
/v1/wall/other
To be like that, we be able to configure each products that may return difference results
Second developer disagree, give the opinions that
If be like that, it will make infinite endpoint. it will have /wall/someone, /wall/sometwo.
We should have single endpoint, and just let that be a part of query. ex. /wall?user=someone, /wall?user=sometwo
The endpoint should be look like technical schema, it return the same result, why it have to seperated to make it more jobs on maintenance the code.
What is the good practice to design our endpoint? Is it should be endpoint by the product? or is it should be by schema?
It should depend on what 'resource' that the service is suppose to manage from the API user perspective and not from the internal implementation.
With that, if the service is to manage say, a resource that can be identified by 'someone', 'sometwo' and, then the correct way to model it is
/wall/someone/
/wall/sometwo/
In this case, 'someone' and 'sometwo' are two different resources and you could have infinite # of them; but that has nothing to do with the internal storage or implementation.
On the backend, there should be some url pattern to extract 'someone' and 'sometwo' as resource and map them into internal implementation details.
What are these "endpoints" you speak of? That's SOAP terminology! RESTful web services are defined in terms of "resources" that are uniquely identified by URL.
A resource typically represents an entity in your domain model (e.g., a user). The ID of the entity is typically used as a path element ("path parameter" in the lingo of most REST libraries, such as JAX-RS) in the URL. Query parameters should only be used to sort/filter results on the server side.
Your first developer is closer to being correct.

SaaS location of admin URL

Background
I work at a SaaS company where you get a site when you signup.
If the company's url is saas.com this could be a list of clients:
abc.saas.com
mysite.saas.com
so.saas.com
Currently, each of our clients has to go to /admin to get to his admin panel.
abc.saas.com/admin
mysite.saas.com/admin
so.saas.com/admin
The thing is that services like Clicktale that track users by recording them, limit the amount of subdomains you can track. If you want more subdomains, you have to pay more.
Because of this we are analyzing the possibility of migrating to admin.saas.com as a single subdomain for all admin panels.
Which are the pros and cons of having several /admin subdomains VS a single admin subdomain?
Considerations 
SSL is already solved, we have a wildcard certificate
We could keep a 301 redirect from /admin to the admin.saas.com
Thanks!
Pros to have a single domain (admin.saas.com):
Users having more subscriptions can manage subdomains much easier (they don't have to navigate to a different URL)
Your documentation and videos will be easier to understand with a specific address. Links with placeholders like {yourdomain}.saas.com/admin make clients think.
Firewall rules could be set up easier in a complex architecture
We had to make the same decision while developing our SaaS/PaaS product few months ago and we are happy with this implementations. According to your scenario, I cannot see any cons.

Facebook Connect on multiple domains with centralized login

we are looking into implementing Facebook Connect on our wiki service, http://www.wikidot.com. User-created sites span the *.wikidot.com domain, but also custom domains (like mine http://michalf.me), all handled by our single service.
We have a centralized account system. Users always log in (and create accounts) at www.wikidot.com and they are automatically logged in in all subdomains (cookie domain set to .wikidot.com - easy) and custom domains (automatically, via a series of redirects).
We would like to add FC into our login flow. Now, it would be great to get some clarification about FC Terms, which suggests using one App ID for every domain. In our case however user-created sites are not separate applications.
So, is it OK to use FC on one centralized website where our users log in (on www.wikidot.com) and expand user status on other domains connected to our service? This is how it works right now, without FC.
It would be great if we could get clarification from someone from FB to make sure we will not be violating any terms or policies.
Thanks!
It isn't possible (as far as I know anyway) to use the same app ID on multiple domains. FB allows use across subdomains, but I have found some difficultly with this even at times with the cookies. When you set up an app, you are asked to provide the domain for it. The domain you put here is the only domain that your app will work for. If your users are only ever signing in on wikidot.com, then I suppose you can use what you have already to move those sessions onto the other domains, but once you are on the other domain, you won't be able to use any of the facebook api features; any requests you make will fail.
I think the 'one app id for every domain' condition is more to target people who are trying to use multiple app ids for one domain. I think so long as you aren't transferring any data about the user to different domains/adverts etc, you should be ok. Essentially what you are doing is adding FB connect to your wikidot site, then a separate feature of wikidot is to keep you logged in on other partner sites?