<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-shell.git/lib/gitlab_access.rb, branch zj-cleanup-exec</title>
<subtitle>gitlab.com: gitlab-org/gitlab-shell.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/'/>
<entry>
<title>Revert "Merge branch 'ash.mckenzie/srp-refactor' into 'master'"</title>
<updated>2018-08-13T23:22:46+00:00</updated>
<author>
<name>Nick Thomas</name>
<email>nick@gitlab.com</email>
</author>
<published>2018-08-13T23:22:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=c8bf2e7d47c3b8f34cb79847edcd5dd50b8f280e'/>
<id>c8bf2e7d47c3b8f34cb79847edcd5dd50b8f280e</id>
<content type='text'>
This reverts commit 3aaf4751e09262c53544a1987f59b1308af9b6c1, reversing
changes made to c6577e0d75f51b017f2f332838b97c3ca5b497c0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 3aaf4751e09262c53544a1987f59b1308af9b6c1, reversing
changes made to c6577e0d75f51b017f2f332838b97c3ca5b497c0.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use actor when we don't know if it's a Key or User</title>
<updated>2018-08-01T00:12:09+00:00</updated>
<author>
<name>Ash McKenzie</name>
<email>amckenzie@gitlab.com</email>
</author>
<published>2018-07-31T11:06:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=4c4d9f5ef4a2e3ac16d0b02e18b19ba513849f57'/>
<id>4c4d9f5ef4a2e3ac16d0b02e18b19ba513849f57</id>
<content type='text'>
* Use gl_id when we don't know if it's a key-X or user-X
* Use Actor.new_from(gl_id) which will figure out if it's a Key or User
* Use key_str when we're referring to key-X as key_id is confusing
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Use gl_id when we don't know if it's a key-X or user-X
* Use Actor.new_from(gl_id) which will figure out if it's a Key or User
* Use key_str when we're referring to key-X as key_id is confusing
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove GitAccessStatus as not required</title>
<updated>2018-07-31T14:24:16+00:00</updated>
<author>
<name>Ash McKenzie</name>
<email>amckenzie@gitlab.com</email>
</author>
<published>2018-07-26T09:06:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=8bd29b09cd57478a570d509ec1e9785381897495'/>
<id>8bd29b09cd57478a570d509ec1e9785381897495</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Utilise new Actions</title>
<updated>2018-07-31T14:24:16+00:00</updated>
<author>
<name>Ash McKenzie</name>
<email>amckenzie@gitlab.com</email>
</author>
<published>2018-07-26T09:06:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=ecba183b60eb0798ecf1736659ed7d0a995d0f01'/>
<id>ecba183b60eb0798ecf1736659ed7d0a995d0f01</id>
<content type='text'>
* Move gitaly, git-lfs and 2FA logic out from gitlab_shell.rb
* Streamline parsing of origin_cmd in GitlabShell
* Utilise proper HTTP status codes sent from the API
* Also support 200 OK with status of true/false (ideally get rid of this)
* Use HTTP status constants
* Use attr_reader definitions (var over @var)
* Rspec deprecation fixes
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Move gitaly, git-lfs and 2FA logic out from gitlab_shell.rb
* Streamline parsing of origin_cmd in GitlabShell
* Utilise proper HTTP status codes sent from the API
* Also support 200 OK with status of true/false (ideally get rid of this)
* Use HTTP status constants
* Use attr_reader definitions (var over @var)
* Rspec deprecation fixes
</pre>
</div>
</content>
</entry>
<entry>
<title>Tidy up GitlabAccess</title>
<updated>2018-07-31T14:24:16+00:00</updated>
<author>
<name>Ash McKenzie</name>
<email>amckenzie@gitlab.com</email>
</author>
<published>2018-07-26T08:51:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=9853fe040288a8a4703cb5f53c000bafd79a2bd2'/>
<id>9853fe040288a8a4703cb5f53c000bafd79a2bd2</id>
<content type='text'>
* Rename actor to key_id
* protected to private
* Move attr_reader defintions under private
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Rename actor to key_id
* protected to private
* Move attr_reader defintions under private
</pre>
</div>
</content>
</entry>
<entry>
<title>Move common exceptions into errors.rb</title>
<updated>2018-07-31T14:24:16+00:00</updated>
<author>
<name>Ash McKenzie</name>
<email>amckenzie@gitlab.com</email>
</author>
<published>2018-07-26T08:19:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=7a2c47f2e1ba2baacfe0ad228898aa341055a141'/>
<id>7a2c47f2e1ba2baacfe0ad228898aa341055a141</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add relative git object dir envvars to check access request</title>
<updated>2017-10-10T16:49:47+00:00</updated>
<author>
<name>Ahmad Sherif</name>
<email>me@ahmadsherif.com</email>
</author>
<published>2017-10-05T11:21:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=de1446d3a34c110c9cea0c6b8fb0c76826201426'/>
<id>de1446d3a34c110c9cea0c6b8fb0c76826201426</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle GL_REPOSITORY env variable and use it in api calls</title>
<updated>2017-05-11T15:21:31+00:00</updated>
<author>
<name>Alejandro Rodríguez</name>
<email>alejorro70@gmail.com</email>
</author>
<published>2017-04-28T20:10:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=ee259653e7a00359740ca36cef606f9c3cc1a7cb'/>
<id>ee259653e7a00359740ca36cef606f9c3cc1a7cb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Pass relevant git environment variables while calling `/allowed`</title>
<updated>2016-12-16T04:09:12+00:00</updated>
<author>
<name>Timothy Andrew</name>
<email>mail@timothyandrew.net</email>
</author>
<published>2016-12-07T07:39:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=fc2016484aacb82980c1c9082e195110f0eacb34'/>
<id>fc2016484aacb82980c1c9082e195110f0eacb34</id>
<content type='text'>
1. Starting version 2.11, git changed the way the pre-receive flow works.

  - Previously, the new potential objects would be added to the main repo. If the
    pre-receive passes, the new objects stay in the repo but are linked up. If
    the pre-receive fails, the new objects stay orphaned in the repo, and are
    cleaned up during the next `git gc`.

  - In 2.11, the new potential objects are added to a temporary "alternate object
    directory", that git creates for this purpose. If the pre-receive passes, the
    objects from the alternate object directory are migrated to the main repo. If
    the pre-receive fails the alternate object directory is simply deleted.

2. In our workflow, the pre-recieve script calls the `/allowed` endpoint on the
   rails server. This `/allowed` endpoint calls out directly to git to perform
   various checks. These direct calls to git do _not_ have the necessary
   environment variables set which allow access to the "alternate object
   directory" (explained above). Therefore these calls to git are not able to
   access any of the new potential objects to be added during this push.

3. We fix this by passing the relevant environment variables
   (GIT_ALTERNATE_OBJECT_DIRECTORIES, GIT_OBJECT_DIRECTORY, and
   GIT_QUARANTINE_PATH) to the `/allowed` endpoint, which will then include
   these environment variables while calling out to git.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. Starting version 2.11, git changed the way the pre-receive flow works.

  - Previously, the new potential objects would be added to the main repo. If the
    pre-receive passes, the new objects stay in the repo but are linked up. If
    the pre-receive fails, the new objects stay orphaned in the repo, and are
    cleaned up during the next `git gc`.

  - In 2.11, the new potential objects are added to a temporary "alternate object
    directory", that git creates for this purpose. If the pre-receive passes, the
    objects from the alternate object directory are migrated to the main repo. If
    the pre-receive fails the alternate object directory is simply deleted.

2. In our workflow, the pre-recieve script calls the `/allowed` endpoint on the
   rails server. This `/allowed` endpoint calls out directly to git to perform
   various checks. These direct calls to git do _not_ have the necessary
   environment variables set which allow access to the "alternate object
   directory" (explained above). Therefore these calls to git are not able to
   access any of the new potential objects to be added during this push.

3. We fix this by passing the relevant environment variables
   (GIT_ALTERNATE_OBJECT_DIRECTORIES, GIT_OBJECT_DIRECTORY, and
   GIT_QUARANTINE_PATH) to the `/allowed` endpoint, which will then include
   these environment variables while calling out to git.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add instrumentation to push hooks</title>
<updated>2016-11-16T12:10:56+00:00</updated>
<author>
<name>Ahmad Sherif</name>
<email>me@ahmadsherif.com</email>
</author>
<published>2016-11-16T12:09:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=79558da92f627da9e310160c89acdeba8b92b359'/>
<id>79558da92f627da9e310160c89acdeba8b92b359</id>
<content type='text'>
Related to #22053
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Related to #22053
</pre>
</div>
</content>
</entry>
</feed>
