René's URL Explorer Experiment


Title: Create an authorization framework · Issue #35 · JSONAPIdotNET/JSONAPI.NET · GitHub

Open Graph Title: Create an authorization framework · Issue #35 · JSONAPIdotNET/JSONAPI.NET

X Title: Create an authorization framework · Issue #35 · JSONAPIdotNET/JSONAPI.NET

Description: This is something I had attempted the oft-mentioned original version of this library, but it ended up very very cumbersome and error prone--I'm not sure this will be practical The "Dream" of JSONAPI.EntityFramework.Http.ApiController and...

Open Graph Description: This is something I had attempted the oft-mentioned original version of this library, but it ended up very very cumbersome and error prone--I'm not sure this will be practical The "Dream" of JSONAP...

X Description: This is something I had attempted the oft-mentioned original version of this library, but it ended up very very cumbersome and error prone--I'm not sure this will be practical The "Dream&q...

Opengraph URL: https://github.com/JSONAPIdotNET/JSONAPI.NET/issues/35

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Create an authorization framework","articleBody":"_This is something I had attempted the oft-mentioned original version of this library, but it ended up very very cumbersome and error prone--I'm not sure this will be practical_\n\nThe \"Dream\" of `JSONAPI.EntityFramework.Http.ApiController` and really of `JSONAPI.Http.ApiController` and `IMaterializer` is to be able to provide an almost completely canned JSON API compliant service broker--all you have to do is to override/implement a few interface points to integrate with your persistence layer and you're done. However, especially in the case of the EF `ApiController`, this has turned out to be more _pipe_ dream so far, as I usually have to override the verb methods and it's hard to reuse the super-method.\n\nOne of the main reasons I find myself having to throw away the default verb implementations (particularly `Put`, `Post`, and `Delete` is to insert authorization controls, for example to make sure users can only edit their own records. Additionally, I often need to control things at the _property_ level, e.g. a user can't change the `Owner` of a record to someone else (but an admin user may be able to do this).\n\nIn the current architecture, the separation of the deserialization from the `IMaterializer` provides a good place to inject a reusable authorization layer. We could add an `IAuthorizationProvider` property to the `IMaterializer`, and have some API for the `IMaterializer` to ask the `IAuthorizationProvider` whether any given property update should be allowed. This in theory would be good from a separation of concerns perspective, because it would encourage encapsulation of security logic from other business logic.\n\nGotchas (from previous experience):\n- My previous attempt at this involved a bunch of attributes on model classes and properties, the goals of which were to define the default behavior from which to allow overrides (think Apache's `Order Deny,Allow; Deny from All`). This sounded good, but led to the definition of more exceptions than rules--possibly not the best way to go.\n- Sometimes separation of the authorization logic from the business logic was a bad thing. Specifically, if both authorization decisions and other business logic depended on making the same expensive calculation--I'd find myself pushed into making the calculation twice.\n- My earlier attempt also provided separate tiers of control for the object and the property, with callbacks that could be defined to allow/deny access to read/modify the object, and then also to allow/deny read/write access to the property. This theoretically would improve performance--if the user was denied writes to the object, there was no need to make callbacks to ask about the properties. In practice though, this led again to a lot of duplication of logic and computation because the same queries or calculations had to be made in both tiers.\n","author":{"url":"https://github.com/SphtKr","@type":"Person","name":"SphtKr"},"datePublished":"2015-01-29T06:59:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/35/JSONAPI.NET/issues/35"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9be15b49-1b8d-34f6-123c-65ebd0a53c52
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD1E8:16DE6C:52AD22:729338:6A506F2F
html-safe-nonce84b0a70ba725bfc8f46c306d8f330440c2c812e7de91ecb02f90ef620b3e3323
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUU4OjE2REU2Qzo1MkFEMjI6NzI5MzM4OjZBNTA2RjJGIiwidmlzaXRvcl9pZCI6Ijc1MDQ1OTE5ODE1MTI3ODE2MTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaccaae407b4f864c7457c9545f60cdf953205d344fc0165e6396bfb35a587619a2
hovercard-subject-tagissue:55864165
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JSONAPIdotNET/JSONAPI.NET/35/issue_layout
twitter:imagehttps://opengraph.githubassets.com/de6d843fc7ac13cb2f7d9138220093ba189148235fa8ea8d9982367d3f35a758/JSONAPIdotNET/JSONAPI.NET/issues/35
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/de6d843fc7ac13cb2f7d9138220093ba189148235fa8ea8d9982367d3f35a758/JSONAPIdotNET/JSONAPI.NET/issues/35
og:image:altThis is something I had attempted the oft-mentioned original version of this library, but it ended up very very cumbersome and error prone--I'm not sure this will be practical The "Dream" of JSONAP...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameSphtKr
hostnamegithub.com
expected-hostnamegithub.com
Noned6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb
turbo-cache-controlno-preview
go-importgithub.com/JSONAPIdotNET/JSONAPI.NET git https://github.com/JSONAPIdotNET/JSONAPI.NET.git
octolytics-dimension-user_id16112275
octolytics-dimension-user_loginJSONAPIdotNET
octolytics-dimension-repository_id27474358
octolytics-dimension-repository_nwoJSONAPIdotNET/JSONAPI.NET
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27474358
octolytics-dimension-repository_network_root_nwoJSONAPIdotNET/JSONAPI.NET
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/JSONAPIdotNET/JSONAPI.NET/issues/35#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSONAPIdotNET%2FJSONAPI.NET%2Fissues%2F35
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSONAPIdotNET%2FJSONAPI.NET%2Fissues%2F35
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=JSONAPIdotNET%2FJSONAPI.NET
Reloadhttps://github.com/JSONAPIdotNET/JSONAPI.NET/issues/35
Reloadhttps://github.com/JSONAPIdotNET/JSONAPI.NET/issues/35
Reloadhttps://github.com/JSONAPIdotNET/JSONAPI.NET/issues/35
Please reload this pagehttps://github.com/JSONAPIdotNET/JSONAPI.NET/issues/35
JSONAPIdotNET https://github.com/JSONAPIdotNET
JSONAPI.NEThttps://github.com/JSONAPIdotNET/JSONAPI.NET
Notifications https://github.com/login?return_to=%2FJSONAPIdotNET%2FJSONAPI.NET
Fork 23 https://github.com/login?return_to=%2FJSONAPIdotNET%2FJSONAPI.NET
Star 101 https://github.com/login?return_to=%2FJSONAPIdotNET%2FJSONAPI.NET
Code https://github.com/JSONAPIdotNET/JSONAPI.NET
Issues 28 https://github.com/JSONAPIdotNET/JSONAPI.NET/issues
Pull requests 5 https://github.com/JSONAPIdotNET/JSONAPI.NET/pulls
Actions https://github.com/JSONAPIdotNET/JSONAPI.NET/actions
Projects https://github.com/JSONAPIdotNET/JSONAPI.NET/projects
Wiki https://github.com/JSONAPIdotNET/JSONAPI.NET/wiki
Security and quality 0 https://github.com/JSONAPIdotNET/JSONAPI.NET/security
Insights https://github.com/JSONAPIdotNET/JSONAPI.NET/pulse
Code https://github.com/JSONAPIdotNET/JSONAPI.NET
Issues https://github.com/JSONAPIdotNET/JSONAPI.NET/issues
Pull requests https://github.com/JSONAPIdotNET/JSONAPI.NET/pulls
Actions https://github.com/JSONAPIdotNET/JSONAPI.NET/actions
Projects https://github.com/JSONAPIdotNET/JSONAPI.NET/projects
Wiki https://github.com/JSONAPIdotNET/JSONAPI.NET/wiki
Security and quality https://github.com/JSONAPIdotNET/JSONAPI.NET/security
Insights https://github.com/JSONAPIdotNET/JSONAPI.NET/pulse
Create an authorization frameworkhttps://github.com/JSONAPIdotNET/JSONAPI.NET/issues/35#top
enhancementhttps://github.com/JSONAPIdotNET/JSONAPI.NET/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/SphtKr
SphtKrhttps://github.com/SphtKr
on Jan 29, 2015https://github.com/JSONAPIdotNET/JSONAPI.NET/issues/35#issue-55864165
enhancementhttps://github.com/JSONAPIdotNET/JSONAPI.NET/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.