Skip to content

1) Windows group-based auth 2) building and deployment instructions #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

maxim--s
Copy link

  1. Limits repo creation and push rights to the Windows group members, the group name is in web.confg
  2. Added BuildingAndDeployment.txt

@gregsohl
Copy link
Collaborator

What I have coming for authorization is much more extensive than this, though windows group based would be a good extra authorization provider for my implementation, which includes a Git Hook to provide additional restrictions.

@otac0n
Copy link
Owner

otac0n commented May 19, 2013

We should get together to turn this into a an Autorization provider implementation.

@gregsohl
Copy link
Collaborator

See Issue #64. My commit, almost ready for pull request, is here: https://github.com/gregsohl/WebGitNet/tree/AuthorizationLayer. The hook isn't there, though I'm ready to push it. Maybe later today.

@maxim--s
Copy link
Author

Had a brief look at your code, it looks really great. Since probably I will need to deploy Git soon at my workplace, I will use my code for now, till your code (much better one) will be fully done.

BTW – I’m using this code snippet:

            (System.Security.Principal.WindowsPrincipal)User

   to get the “current user” object. The snippet is used in ASP.NET MVC Controller context and uses the User property from the framework.

   Yes, I know that there are lots of Linux software which use some pathetic authentication like the passwords kept in the text file or such, but, since we are the Windows (ASP.NET) app, I really think we should use Windows-provided (and ASP.NET-provided) means of _authentication_, i.e. password checking.

   As about _authorization_, i.e. checking the permissions to execute the particular actions on a particular object (given that we already have some kind of the User object from authentication step) – then I really like the idea to port some well-known Linux-based stuff (my code is really a quick hack just to make the thing suitable for my needs).

   So, until there are some better ways _provided by ASP.NET or some other Microsoft’s layer_, I would really recommend to use the code snippet above to get the “current user” object (and embed all password-checking stuff there).

   Also, one of my patches was to pass the name of this user (i.e. the name typed by the client in the browser’s HTTP auth dialog) to the USER env var, so that _Git and its hooks ported from Linux_ will see it. Probably this can also be valuable.

   Max

From: Greg Sohl [mailto:[email protected]]
Sent: Sunday, May 19, 2013 10:22 PM
To: otac0n/WebGitNet
Cc: Maxim Shatskikh
Subject: Re: [WebGitNet] 1) Windows group-based auth 2) building and deployment instructions (#74)

What I have coming for authorization is much more extensive than this, though windows group based would be a good extra authorization provider for my implementation, which includes a Git Hook to provide additional restrictions.


Reply to this email directly or view it on GitHubhttps://github.com//pull/74#issuecomment-18122194.

@gregsohl
Copy link
Collaborator

Cool.

I am using Windows Authentication. The authorization layer is based on the Gitolite config file layout.

For my hook's purpose, I am putting the authenticated user information in a environment variable before executing Git. The hook can pick it up and then evaluate using the same set of permissions, from the config file.

Would be easy to layer your windows groups based approach in this.

Greg

@maxim--s
Copy link
Author

That’s good, Greg. Looks like I was making a point solution just to satisfy the particular needs, while you’re working on a serious well-designed stuff, also compatible with Linux stuff in terms of access rights file layout.

Probably both should survive in the master branch someday ☺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants