Authentication Error Access Denied Authorization Required
Support Search GitHub This repository Watch 352 Star 7,464 Fork 709 strongloop/loopback Code Issues 601 Pull requests 34 Projects 0 Wiki Pulse Graphs New issue Error "401 Authorization required" when querying methods involving relations #426 Closed samuele-artuso opened this Issue Jul 31, 2014 · 34 comments Projects None yet Labels doc Milestone No milestone Assignees No one assigned 17 participants samuele-artuso commented Jul 31, 2014 I've recently migrated an application to LoopBack 2.0. All my models require user authentication and have these ACLs: "acls": [ { "accessType": "*", "permission": "DENY", "principalType": "ROLE", "principalId": "$everyone" }, { "accessType": "READ", "permission": "ALLOW", "principalType": "ROLE", "principalId": "$authenticated" } ] I have a model called issues. After logging in through the POST method /Users/login: I don't have any problems when calling the GET method /issues. I get a list of issues as expected; When I query a method involving a relation between two models (e.g. GET /issues/{id}/categories), I get the error 401 Authorization required. The same model used to work in Loopback 1.0. Any clues? daankets commented Aug 12, 2014 I have the same issue. I also think the 401 Unauthorized is a wrong response. I am authenticated, so it should be 403 forbidden. I'm opening a new issue for that. gcirne commented Aug 12, 2014 I think this has already been implemented: #301 daankets commented Aug 12, 2014 This issue (#426) itself is not yet resolved. Defining an ACL on a relation property does not seem to work for me. Replicate by defining a model, adding a relationship to it (for example many user to many group). Then DENY ALL on * for ROLE $everyone, and finally ALLOW READ/EXECUTE on for ROLE $authenticated. I consequently get access denied for these relationships. dagumak commented Aug 19, 2014 I am having the exact same issue! I spent a few hours digging through anything I can find, but I still couldnt get it to work! fab
One games Xbox 360 games PC games Windows games Windows phone games Entertainment All Entertainment Movies & TV Music Business & Education Business Students & educators Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security https://github.com/strongloop/loopback/issues/426 Internet Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Band Microsoft https://support.microsoft.com/en-us/kb/811318 Lumia All Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Access Denied error after setting up MVC application up vote 12 down vote favorite 2 Access is denied. Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL. Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server's administrator for additional assistance. Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET > Version:4.0.30319.18010 I followed the simple tutorial from here, ran the application and received this message. c# asp.net-mvc-4 share|improve this question edited Jan 3 '13 at 9:43 HaemEternal 1,32941945 asked Jan 3 '13 at 9:09 Nick Ky 69114 2 What is the hosting environment? I mean do you have the access to the file system? or you are on a shared host, or you are debugging you application using visual studio directly? –Mohamed Sakher Sawan Jan 3 '13 at 9:11 Try to open VS as Administrator. Did you set up IIS or IIS Express? –Davin Tryon Jan 3 '13 at 9:12 I am debugging it using visual studio directly and yes i tried open VS as administrator too –Nick Ky