I apologize for not responding sooner, I have been out of town on a much needed vacation. Also, sorry to the original poster, we seem to have hijacked your thread
I definately agree with several of your points. Minimizing the profile of the application, limiting it's priviledges, etc. Maintainability and extensibility don't really apply directly to the authentication issue, but are always assumed targets in my book. I'm allergic to one off apps, because even a one off app can be documented and dumped into a code library as an example. It was probably not a good idea to mention the obscurity portion, it was more of a side thought at the time. By no means do I think an app should ever depend on obscurity, in this case it would require authentication no matter what page was hit first.
Now, I agree that it is possible that an IT user could mistakenly assign extra rights to a role being used for the website. No one is perfect, but we can minimize the chances of this. I am not an AD expert by any stretch of the imagination, but if we were using groups to define access and also allow us to contact all users of a specific group at the same time, we could easily nest these groups, provide descriptions, etc to minimize the chances that a user would unwittingly receive additional access priveledges. On a side note, if IT is going around giving role permissions on a best guess principle, we likely have much deeper problems than the possibility of someone getting in through the website.
The passing of a string method you mention is a danger that has been around for a while, due to form spoofing. It appears I removed it from my previous post when I rewrote it, but I originally suggested checks on the submission page (or in this case, in the onClick event) to make sure that a passed value was one of the allowed values. As I am sure you know, its never a good idea to trust any user input without double checking both it's type and content validity. This helps protect against both accidental or less than intelligent submissions as well as form spoofs.
To even allow for the application to users to roles in AD you have to give a web application power far beyond what it should have (think "principle of least privilege").
I agree wholeheartedly. The best solution is to make use of existing groups for access, allow the admins to do their jobs, etc. Unfortunatly the point we started with was determining a safe method to allow users (admins) to assign roles/priveledges from inside a web application to external resources (in this case reports).
As far as travelling salesman are concerned, they don't need external access. I wouldn't even put an application like this on a system that can be accessed externally. It is simply a tool to manage a subset of what the full blown AD tool can manage. If management does request you to put up the management tool as an externally accessible resource, it's time to polish up the resume.
The additional complexity in the SQL model I am commenting on is not complexity from a developers standpoint. Complexity from the developers standpoint can be an issue (as it leads to greater possibility of error) but the complexity I am concerned with is the functioning end system. In the end, whether we write the code or not, we have more systems involved in the mix. On top of that, the users now have access to the database for which there have been a large number of vulnerabilities displayed over the years, some conveniently packaged into tools. By your own argument we cannot assume that obscurity is protection, so a user could directly access the database, at which point they then have a number of possible routes to gaining access to admin level applications directly on the server, a beachhead if you will.
In the end, the purpose of the proposed tool was to assign AD permissions so that users would be given permissions to resources like reports. So we are actually talking about two differant sets of authentication, those being assigned and those necessary for accessing the tool in the first place. It was your argument that we shouldn't create a tool that can manipulate AD in this manner, that instead we should be using Windows Authentication and SQL Server to grant access to specific tables/stored procs/etc. Where do those Windows groups come from that are being assigned permissions in SQL Server? Will we be first creating them in AD manually or will they be local groups on that speciifc server? Do we assign these roles manually or create a tool to manage these similar to the proposed AD management tool? How many databases do these reports pull data from? If we are lucky and it is only one or two databases, will we ever have reports that access differant dbs in the future? Will we then manually grant access to tables and stored procedures in every database that is accessed by a report? How is this differant from creating a tool to do it more easily with a more limited set of capabilities then enterprise manager? Or do we create a table in SQL Server that manages access to the reports (perhaps by crossreferencing windows groups with links) and query that before supplying a link to a report? How, exactly, do we figure out who has permission to what? At this point, haven't we created our own extremely specific directory service that doesn't tie into integrated windows authentication at all? I agree that SQL Server should be locked down, but I do not believe it should be the primary controller of access.
You can say the app might be safe if the roles an application adds are low-privileged (a conditional assumption) and if the application is only an internal website (another assumption), but then your application is coupled to a specific set of assumptions.
Every application has built-in assumptions. Even if those assumptions are less obvious or less dangerous, then are still assumptions. I agree it is our task to minimize these assumptions, but there is a point of diminishing returns. At the same time, is it not an assumption that the DBA will never assign greater permissions to a role or group, perhaps thinking it was a differant one? Will all of the applications that need access restrictions fail gracefully when they get access denied errors (or will they spit out very specific error information and expose internal database information to the world)? Are we not assuming that no one will be lazy enough to grant unconditional access to a database rather than step through 30 groups of people assigning very specific permissions? And are we not assuming that by not creating a production level application, that one of the IT guys will not hack together their own tool to manage these things?
My suggested route would be to create this management tool as a completely seperate resource from any websites that serve reports, etc. Use AD to authenticate that a user logging into it has the appropriate level of permissions to make modifications. If you absolutely must allow non-IT users to access the tool (by perhaps having one member of each department have the capability to manage who can access their departments reports/etc) then lock down creation of new groups or roles to an admin level group (like Domain Admins) and create a secondary group that will be allowed to assign users to a subset of groups. My logic behind this would be to allow Domain Admins to add group/role names to a SQL Server table. When a non-Domain Admin logged in that was in the secondary group they could then assign/remove users from any group in the SQL table that they themslves were also members of. Maybe add in some protection to prevent people from removing themselves from groups, as I know some user would end up doing that once a week.