How to secure GIT Repository Options in TFS 2017 - tfs-security

We're setting up a new on prem TFS 2017 and would like to secure who can change options on a repository.

UPDATE2:
#AllanPalmer I help you submit the user voice here, please track it as needed.
UPDATE1:
There isn't the secure setting to restrict access the "Options"
You can only set the existing User/Group permissions for specific repository based on your requirements.
You can follow below ways to set the repo permission:
Go to Code > Manage Repositories > Select the specific
repository > Select the User/Group > Set the permissions
based on your requirements (eg set Manage permissions to
Deny)
or
Navigate to the specific repository, Right click the repository >
Security > Select the User/Group to set the permission
accordingly.

Related

How to remove a Branch Policies inside All repositories Policies settings

I add new branch policy inside Azure Repos > Project Settings > All Repositories > Repositories > Policies, settings.
I enter a pattern and define few options.
Now I want to remove/delete that branch policy, but I do not find any way to remove it (even If I disable all options).
Go to Azure Repos > Project Settings > All Repositories > Repositories > Policies. Scroll down to Branch policies. Select one and click on it. It opens Cross-Repository policies.. Scroll down, select rule to delete, in the right click on 3 dots and from menu select Delete.
Cross repository policies - Delete one

Set Permissions to Test Plans only

I'm currently searching for a way to grant specific users permissions to only use and manage the features listed ind the Test Plans tab in azure devops. So users in this group/team should not be able to see releases, builds, code and all the other stuff in the current project.
Is there a Way to achieve this?
Thanks
There is no default way to disable services of Repos, Pipeline, etc. You need to set the permission for each resource by referring to the following link:
https://learn.microsoft.com/en-us/azure/devops/organizations/security/permissions?view=azure-devops&tabs=preview-page
For example, make users not see the repo, you can deny the "Read" permission for the repo:

Azure DevOps make project read only

We have some old ADO/VSTS projects that we want to archive and make read only. Each project has work items, builds, git repos, etc...
at the moment the only methods I have found are painful.
Remove all groups except read only group and add users in there. this is too painful and long, we have over 300 projects to make read only
Create a new group and then add in other groups (e.g. proj admins, contributors etc..) and then add this group to the top level area/git repo path and set all to DENY. *
I tried this with git repos and There is some issues with this as some
permissions are not inherited down to individual users who created the
git repo and they are still able to checkin.
Here you can see I created a READONLY group and set everything to DENY except Read permissions. (The members of this group are the default groups e.g. contributors, build admins, proj admins)
However, I had a repo created by a test user BEFORE i created the readonly group and it seems that user still has permissions to that repo
ok ok I understand that if the permissions are set at the lower level, then they won't be inherited down from the top level parent. I could create a script that checks the users of every git repo and sets their check-in permissions to deny but that is painful and i would prefer not to do that. Likewise, some projects have over 300 git repos.
FYI I want to make the whole project read only not just git repos.
Azure DevOps now have a feature called: "Disable Repository".
Disable access to to the repository (including builds, pull requests,
etc) but keep the repository discoverable with a warning.
It means your repo will not allow commits, even builds and pipelines cannot use it. Just go to your Devops "Project Settings". Scroll down to "Repositories" menu and select which Repo do you want to disable.
Yeah, you've found one of the nasty features of the Azure DevOps permission model. More specific ACLs trump less specific ACLs. Even for DENY rules.
When there is an explicit ALLOW rule on a more specific ACL, it will override the DENY on a less specific ACL.
Specificity for git is based on:
Server (TFS only)
Organization / Project Collection
Project
Default repo settings
Specific repo settings
Branch folder settings (only settable through API)
Specific branch settings
Similar hierarchies exist for other securables.
There is no easy way to strip these all, apart from scripting the action.
The Azure CLI has a devops extension which will allow you to script out what you want and can output JSON to make it easier to script.
You can use az devops security permission list to list all permissions defined for a identity (group or user) and az devops security permission reset or az devops security permission update to unset or override the given permission.
Other probably needed calls:
az devops security group list
az devops user list
az devops security group membership *
You can use the Azure DevOps disable repository option, which has the disadvantage that the repo is not showing up in the list of repos under the project anymore. This might not be desired if the code should still be readable for reference purposes.
The other method explained in one of the answers is to manually remove any write permissions using the repository settings UI. If you have a lot of access control lists on your repos or even need to do this on multiple repos, the manual approach can become time consuming. Therefore I wrote a script to automate this: https://github.com/ckadluba/RemoveAzureGitRepoWritePermissions.
It basically works like this.
.\Remove-AzureGitRepoWritePermissions.ps1 -OrgName "myorganisation" -ProjectName "MyProject" -RepoName "MyRepo"
It sets an explicit deny for the permissions: GenericContribute, ForcePush, CreateBranch, CreateTag, ManageNote, PolicyExempt, PullRequestContribute
and PullRequestBypassPolicy.

Synchronize the user from ldap server to jira soon

I was using a openldap server to control the user in jira and confluence. But after I insert a user into ldap and add the user into the jira-users group, i still need to synchronize the user in jira. Can i set something to let it synchronize automatically after i insert the user into ldap server?
Here are the main steps :
Log in as a user with the JIRA System Administrators permission
Check your configuration : Settings > User Management > User Directories
You can manually synchronize the LDAP cache by clicking 'Synchronize' on the 'User Directories' screen.
If it works, you just need to set the Synchronization Interval on the directory configuration screen.
Otherwise there is probably something wrong with the current config. In this case, I would:
Check the server settings, see if it's reachable when connecting from a terminal.
Similarly, try to perform a search from a terminal using the schema settings.
Disable Incremental Synchronization if enabled.
Ensure the directory order is correct. Changes to users and groups will be made only in the first directory where the application has permission to make changes.
Ref: Connecting to an LDAP directory

How can I limit Jenkins LDAP access to users in a specific groupOfNames?

I can configure Jenkins so it limits access to users on my ldap server by setting the Server and Root DN without a problem.
Now I want to tie down access a little more and only allow access to members of the groupOfNames cn=MyProject,ou=Group,dc=bogus,dc=biz, but I don't see how to do that in Jenkins.
Can someone explain how they configured Jenkins or Hudson to handle something like this ?
Thanks !
NOTE: I'm not sure if this would work for LDAP (we use active directory)
In the project configuration page, check Matrix-based security.
Remove all access for anonymous
Add your 'groupOfNames' to the "user/group to add" and give them the rights you want to.
Any user in that group should get the rights you assign. This is how we did it.
Old thread, I know. I got it working by installing the memberof and refint overlays on the OpenLDAP server (2.4.31) and setting the User Search Base on Jenkins to filter the result, i.e.
(&(uid={0})(memberOf=cn=MyGroupName,ou=group,dc=mydomain,dc=com))