{"action":"created","issue":{"url":"https://api.github.com/repos/NuGet/NuGetGallery/issues/5800","repository_url":"https://api.github.com/repos/NuGet/NuGetGallery","labels_url":"https://api.github.com/repos/NuGet/NuGetGallery/issues/5800/labels{/name}","comments_url":"https://api.github.com/repos/NuGet/NuGetGallery/issues/5800/comments","events_url":"https://api.github.com/repos/NuGet/NuGetGallery/issues/5800/events","html_url":"https://github.com/NuGet/NuGetGallery/issues/5800","id":314165579,"number":5800,"title":"Securing a gallery so that authentication is required to access packages","user":{"login":"Texernie","id":21315772,"avatar_url":"https://avatars1.githubusercontent.com/u/21315772?v=4","gravatar_id":"","url":"https://api.github.com/users/Texernie","html_url":"https://github.com/Texernie","followers_url":"https://api.github.com/users/Texernie/followers","following_url":"https://api.github.com/users/Texernie/following{/other_user}","gists_url":"https://api.github.com/users/Texernie/gists{/gist_id}","starred_url":"https://api.github.com/users/Texernie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Texernie/subscriptions","organizations_url":"https://api.github.com/users/Texernie/orgs","repos_url":"https://api.github.com/users/Texernie/repos","events_url":"https://api.github.com/users/Texernie/events{/privacy}","received_events_url":"https://api.github.com/users/Texernie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-13T16:06:00Z","updated_at":"2018-04-13T21:40:05Z","closed_at":null,"author_association":"NONE","body":"I have searched the issues and the web for this and I am not finding any good answers. I would like to secure my NuGetGallery such that authentication is always required. One of my sources has done this by providing us with a special URL to access their nuget feed.\r\n\r\nhttps://nuget.{vendor}.com/{API Key?}/api\r\n\r\nI have about decided that they are running a custom build of the server. What would be the best way to implement something like this, or where would the easiest place be to implement this?\r\n\r\nI would like my nuget server to behave like below:\r\n\r\n\r\nhttps://nuget.{my company}.com/{API Key?}/api -> pulls packages like normal\r\nhttps://nuget.{my company}.com/api -> 401 Unauthorized or 404 Not Found\r\nhttps://nuget.{my company}.com/{API Key?} -> homepage like normal\r\nhttps://nuget.{my company}.com/ -> login page then to homepage\r\n\r\nEdit:\r\nIt is possible that I can have another piece of software extract the API key from the url and put it into a request header if having the auth key in the header is easier to do.\r\n\r\nThanks in advance for any guidance you can provide.\r\nRegards,\r\nTexernie\r\n"},"comment":{"url":"https://api.github.com/repos/NuGet/NuGetGallery/issues/comments/381267284","html_url":"https://github.com/NuGet/NuGetGallery/issues/5800#issuecomment-381267284","issue_url":"https://api.github.com/repos/NuGet/NuGetGallery/issues/5800","id":381267284,"user":{"login":"joelverhagen","id":94054,"avatar_url":"https://avatars0.githubusercontent.com/u/94054?v=4","gravatar_id":"","url":"https://api.github.com/users/joelverhagen","html_url":"https://github.com/joelverhagen","followers_url":"https://api.github.com/users/joelverhagen/followers","following_url":"https://api.github.com/users/joelverhagen/following{/other_user}","gists_url":"https://api.github.com/users/joelverhagen/gists{/gist_id}","starred_url":"https://api.github.com/users/joelverhagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelverhagen/subscriptions","organizations_url":"https://api.github.com/users/joelverhagen/orgs","repos_url":"https://api.github.com/users/joelverhagen/repos","events_url":"https://api.github.com/users/joelverhagen/events{/privacy}","received_events_url":"https://api.github.com/users/joelverhagen/received_events","type":"User","site_admin":false},"created_at":"2018-04-13T21:40:05Z","updated_at":"2018-04-13T21:40:05Z","author_association":"MEMBER","body":"BTW, @NickCraver has worked on an version of NuGet.Server that uses SQL Server for all storage instead of disk if that is more appropriate for your use-case: https://github.com/NuGet/NuGetGallery/issues/5430."}}
{"actor":{"display_login":"joelverhagen"}}