The has_role_with_expiry fact is like the usual has_role fact, but the fourth argument is the expiration time, expressed as an integer representing seconds since the Unix epoch.
Note: On a *nix system, date +%s will give you the current Unix time in seconds.
@current_unix_time is a constant you can use in rules that will resolve to the current Unix time at the time your query is evaluated.To implement access expiration, we compare the expiration time with the current time.
actor User { }resource Repository { roles = ["member"]; permissions = ["read"]; "read" if "member";}has_role(actor: Actor, role: String, repo: Repository) if expiration matches Integer and has_role_with_expiry(actor, role, repo, expiration) and expiration > @current_unix_time;test "access to repositories is conditional on expiry" { setup { # Alice's access expires in 2033 has_role_with_expiry(User{"alice"}, "member", Repository{"anvil"}, 2002913298); # Bob's access expired in 2022 has_role_with_expiry(User{"bob"}, "member", Repository{"anvil"}, 1655758135); } assert allow(User{"alice"}, "read", Repository{"anvil"}); assert_not allow(User{"bob"}, "read", Repository{"anvil"});}
Was this page helpful?
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Oso Cloud Documentation","colors":{"primary":"#392396","light":"#A78BFA","dark":"#392396"},"logo":{"light":"https://mintcdn.com/osoinc/IZptQQUcDTzNnhFZ/logo/logo_black.svg?fit=max\u0026auto=format\u0026n=IZptQQUcDTzNnhFZ\u0026q=85\u0026s=a23ba87f23f09fee12a107724078979d","dark":"https://mintcdn.com/osoinc/IZptQQUcDTzNnhFZ/logo/logo_white.svg?fit=max\u0026auto=format\u0026n=IZptQQUcDTzNnhFZ\u0026q=85\u0026s=f243e8e50bd0474e6481419e6c602335"},"favicon":"https://mintcdn.com/osoinc/HuMviHxd0NHscL55/favicon.png?fit=max\u0026auto=format\u0026n=HuMviHxd0NHscL55\u0026q=85\u0026s=462aeacb44be5e00705afebb98f0ea1b","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","javascript","go","java","ruby","csharp"]}},"navbar":{"links":[{"href":"https://www.osohq.com/meet-oso","label":"Meet an Engineer"}],"primary":{"type":"button","label":"Try Oso for free","href":"https://ui.osohq.com/"}},"footer":{"socials":{"x":"https://x.com/osohq","github":"https://github.com/osohq","linkedin":"https://www.linkedin.com/company/osohq","slack":"https://join-slack.osohq.com/","youtube":"https://www.youtube.com/@oso-authorization"}},"fonts":{"family":"Inter"},"integrations":{"gtm":{"tagId":"GTM-MK29QFG"}},"banner":{"content":"**AI agents are everywhere.** [See what yours are doing →](https://www.osohq.com/post/introducing-oso-for-coding-agents)","dismissible":true},"contextual":{"options":["copy","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://osohq.com/blog"},{"anchor":"Status Page","icon":"wifi","href":"https://oso.statuspage.io/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"osoinc","hasAudioNarration":false,"actualSubdomain":"osoinc","customDomains":["www.osohq.com"],"gitSource":{"type":"github","owner":"osohq","repo":"oso-cloud-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adf92850461319c0aa1df69","collectionId":"41c75d83-80b3-44ae-9561-b735be5940e9","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adf92850461319c0aa1df69"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adf92850461319c0aa1df69","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Oso for Apps","count":123},{"language":"default","tag":"Reference","count":71},{"language":"default","tag":"Docs","count":43},{"language":"default","tag":"HTTP API","count":40},{"language":"default","tag":"Develop","count":34},{"language":"default","tag":"Oso for Agents","count":30},{"language":"default","tag":"SDKs","count":20},{"language":"default","tag":"Write Policies","count":16},{"language":"default","tag":"Learn","count":11},{"language":"default","tag":"Changelog","count":11}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"develop/policies/patterns/time-based-checks","slug":"/develop/policies/patterns/time-based-checks","pageMetadata":{"title":"Time-based Checks","sidebarTitle":"Time-based Checks","description":null,"href":"/develop/policies/patterns/time-based-checks"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Time-based checks let you give someone access for a limited time by adding an expiration to their role or permission.`}),`\n`,_jsx(Heading,{level:`2`,id:`implementation`,children:`Implementation`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`has_role_with_expiry`}),` fact is like the usual `,_jsx(_components.code,{children:`has_role`}),` fact, but the fourth argument is the expiration time, expressed as an integer representing seconds since the Unix epoch.`]}),`\n`,_jsxs(Warning,{children:[_jsx(_components.strong,{children:`Note:`}),` On a *nix system, `,_jsx(_components.code,{children:`date +%s`}),` will give you the current Unix time in seconds.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`@current_unix_time`}),` is a constant you can use in rules that will resolve to the current Unix time at the time your query is evaluated.`]}),`\n`,_jsx(_components.p,{children:`To implement access expiration, we compare the expiration time with the current time.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`25`,language:`polar`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`polar`,children:_jsxs(_components.code,{language:`polar`,numberOfLines:`25`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`actor`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` User`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { }`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`resource`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Repository`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` roles `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"member\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` permissions `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"read\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"read\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` if`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"member\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`has_role`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(actor: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Actor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, role: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, repo: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Repository`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` expiration `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`matches`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Integer `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`and`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` has_role_with_expiry(actor, role, repo, expiration) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`and`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` expiration `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` @current_unix_time;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`test`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"access to repositories is conditional on expiry\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` setup`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Alice's access expires in 2033`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` has_role_with_expiry`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`User`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"alice\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"member\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Repository`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"anvil\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2002913298`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Bob's access expired in 2022`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` has_role_with_expiry`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`User`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"bob\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"member\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Repository`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"anvil\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1655758135`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` assert`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` allow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`User`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"alice\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"read\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Repository`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"anvil\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` assert_not`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` allow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`User`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"bob\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"read\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Repository`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"anvil\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Time-based Checks","sidebarTitle":"Time-based Checks","description":null,"href":"/develop/policies/patterns/time-based-checks"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Implementation","slug":"implementation","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/osoinc/1de558d9e172e6f8/_nav-example.js"],"subdomain":"osoinc","siteName":"Oso Cloud Documentation","title":"Time-based Checks - Oso Cloud Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-05T13:45:43.968Z","originalFileLocation":"develop/policies/patterns/time-based-checks.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Oso Cloud Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Time-based Checks - Oso Cloud Documentation\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Oso Cloud Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.osohq.com/docs/develop/policies/patterns/time-based-checks\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://osoinc.mintlify.app/_mintlify/api/og/v2?division=Patterns\u0026amp;title=Time-based+Checks\u0026amp;theme=eb85f6ae82e81d3487978aff\u0026amp;signature=e4c85350baafe0327b49fd0d58c9c96fd86a241a7fb80f1ac1a18d07d16128b9\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Time-based Checks - Oso Cloud Documentation\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://osoinc.mintlify.app/_mintlify/api/og/v2?division=Patterns\u0026amp;title=Time-based+Checks\u0026amp;theme=eb85f6ae82e81d3487978aff\u0026amp;signature=e4c85350baafe0327b49fd0d58c9c96fd86a241a7fb80f1ac1a18d07d16128b9\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Oso Cloud Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#392396\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.osohq.com/docs/develop/policies/patterns/time-based-checks\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/develop/policies/patterns/time-based-checks.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.osohq.com/#organization\",\"name\":\"Oso Cloud Documentation\",\"url\":\"https://www.osohq.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/osoinc/IZptQQUcDTzNnhFZ/logo/logo_black.svg?fit=max\u0026auto=format\u0026n=IZptQQUcDTzNnhFZ\u0026q=85\u0026s=a23ba87f23f09fee12a107724078979d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.osohq.com/docs#website\",\"name\":\"Oso Cloud Documentation\",\"url\":\"https://www.osohq.com/docs\",\"publisher\":{\"@id\":\"https://www.osohq.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.osohq.com/docs/develop/policies/patterns/time-based-checks#webpage\",\"url\":\"https://www.osohq.com/docs/develop/policies/patterns/time-based-checks\",\"name\":\"Time-based Checks\",\"dateModified\":\"2026-08-05T13:45:43.968Z\",\"isPartOf\":{\"@id\":\"https://www.osohq.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.osohq.com/docs/develop/policies/patterns/time-based-checks#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.osohq.com/docs/develop/policies/patterns/time-based-checks#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Develop\",\"item\":\"https://www.osohq.com/docs/develop/local-dev/env-setup\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Write Policies\",\"item\":\"https://www.osohq.com/docs/develop/policies/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Patterns\",\"item\":\"https://www.osohq.com/docs/develop/policies/patterns/resource-creation\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Time-based Checks\",\"item\":\"https://www.osohq.com/docs/develop/policies/patterns/time-based-checks\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.osohq.com/docs/develop/policies/patterns/time-based-checks#article\",\"headline\":\"Time-based Checks\",\"name\":\"Time-based Checks\",\"url\":\"https://www.osohq.com/docs/develop/policies/patterns/time-based-checks\",\"mainEntityOfPage\":{\"@id\":\"https://www.osohq.com/docs/develop/policies/patterns/time-based-checks#webpage\"},\"dateModified\":\"2026-08-05T13:45:43.968Z\",\"publisher\":{\"@id\":\"https://www.osohq.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.osohq.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Oso Cloud Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Oso Cloud Documentation","nav":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://osohq.com/blog"},{"anchor":"Status Page","icon":"wifi","href":"https://oso.statuspage.io/"}]},"tabs":[{"tab":"Oso for Agents","pages":[{"title":"Oso for Agents","href":"/oso-for-agents/overview"}]},{"tab":"Oso for Apps","dropdowns":[{"dropdown":"Docs","icon":"book-open","groups":[{"group":"Get Started","pages":[{"title":"An Introduction to Oso Cloud","sidebarTitle":"Introduction","href":"/get-started/introduction"},{"title":"Oso Cloud Quickstart","sidebarTitle":"Quickstart","href":"/get-started/quickstart"}]},{"group":"Develop","pages":[{"group":"Local Development","pages":[{"title":"Environment Setup","sidebarTitle":"Environment setup","href":"/develop/local-dev/env-setup"},{"title":"Oso Dev Server","sidebarTitle":"Oso Dev Server","href":"/develop/local-dev/oso-dev-server"},{"title":"Oso Migrate (Beta)","sidebarTitle":"Oso Migrate","href":"/develop/local-dev/oso-migrate"},{"title":"Oso MCP Server","sidebarTitle":"Oso MCP Server","href":"/develop/local-dev/mcp"}]},{"group":"Write Policies","pages":[{"title":"Overview of Polar Language and Syntax","sidebarTitle":"Overview","href":"/develop/policies/overview"},{"title":"Model Role-Based Access Control (RBAC)","sidebarTitle":"RBAC","href":"/develop/policies/rbac"},{"title":"Model Relationship-Based Access Control (ReBAC)","sidebarTitle":"ReBAC","href":"/develop/policies/rebac"},{"title":"Model Attribute-Based Access Control (ABAC)","sidebarTitle":"ABAC","href":"/develop/policies/abac"},{"title":"Fine-grained Authorization (FGA)","sidebarTitle":"FGA","href":"/develop/policies/fga"},{"title":"Model Field-Level Authorization","sidebarTitle":"Field-Level Authorization","href":"/develop/policies/field-level-authorization"},{"title":"Policy Preview","href":"/develop/policies/policy-preview"},{"group":"Patterns","pages":[{"title":"Resource Creation","sidebarTitle":"Resource Creation","href":"/develop/policies/patterns/resource-creation"},{"title":"Conditional Roles","sidebarTitle":"Conditional Roles","href":"/develop/policies/patterns/conditional-roles"},{"title":"Custom Roles","sidebarTitle":"Custom Roles","href":"/develop/policies/patterns/custom-roles"},{"title":"Entitlements","sidebarTitle":"Entitlements","href":"/develop/policies/patterns/entitlements"},{"title":"Impersonation","sidebarTitle":"Impersonation","href":"/develop/policies/patterns/impersonation"},{"title":"Organization Hierarchies","sidebarTitle":"Organization Hierarchies","href":"/develop/policies/patterns/organizational-hierarchy"},{"title":"Resource Sharing","sidebarTitle":"Resource Sharing","description":null,"href":"/develop/policies/patterns/resource-sharing"},{"title":"Time-based Checks","sidebarTitle":"Time-based Checks","href":"/develop/policies/patterns/time-based-checks"},{"title":"User Groups","sidebarTitle":"User Groups","description":null,"href":"/develop/policies/patterns/user-groups"}]}]},{"group":"Manage Facts","pages":[{"title":"Overview of Facts","sidebarTitle":"Overview","href":"/develop/facts/overview"},{"title":"Insert facts","sidebarTitle":"Insert facts","href":"/develop/facts/insert-facts"},{"title":"Update facts","sidebarTitle":"Update facts","href":"/develop/facts/update-facts"},{"title":"Sync facts","sidebarTitle":"Sync facts","href":"/develop/facts/sync-facts"},{"title":"Export Facts","sidebarTitle":"Export facts","href":"/develop/facts/export-facts"},{"title":"Context Facts","sidebarTitle":"Context facts","href":"/develop/facts/context-facts"},{"title":"Local Authorization","sidebarTitle":"Local Authorization","href":"/develop/facts/local-authorization"}]},{"group":"Enforce Permissions","pages":[{"title":"Authorize Requests","sidebarTitle":"Authorize requests","href":"/develop/enforce/authorize-requests"},{"title":"Enforcement strategies","sidebarTitle":"Enforcement strategies","href":"/develop/enforce/enforcement-strategies"},{"title":"Query Oso Cloud","sidebarTitle":"Query Oso Cloud","href":"/develop/enforce/query-facts"},{"title":"List filtering","sidebarTitle":"List filtering","href":"/develop/enforce/list-filtering"}]},{"group":"Troubleshooting","pages":[{"title":"Logs and auditing","sidebarTitle":"Logs","href":"/develop/troubleshooting/logs"},{"title":"Debugging a Policy","sidebarTitle":"Debugging","href":"/develop/troubleshooting/debugging"},{"title":"Query performance","sidebarTitle":"Query performance","href":"/develop/troubleshooting/query-performance"}]}]},{"group":"Deploy and Manage","pages":[{"title":"Deployment models","sidebarTitle":"Deployment models","href":"/deploy/deployment-models"},{"title":"Oso Fallback - Hybrid Deployment","sidebarTitle":"Fallback nodes","href":"/deploy/fallback-nodes"},{"title":"Backup \u0026 Point-in-time Recovery","sidebarTitle":"Backups and recovery","href":"/deploy/backups-and-recovery"},{"title":"CI/CD with Oso Cloud","sidebarTitle":"CI/CD","href":"/deploy/ci-cd"},{"group":"Account Management","pages":[{"title":"Configuring your account","sidebarTitle":"Account configuration","href":"/deploy/account-management/configuration"},{"title":"Service limits","sidebarTitle":"Service limits","href":"/deploy/account-management/rate-limits"},{"title":"Single Sign-On (SSO) Configuration","sidebarTitle":"SSO","href":"/deploy/account-management/sso"}]}]}]},{"dropdown":"Reference","icon":"square-terminal","groups":[{"group":"Polar","pages":[{"title":"The Polar Language in Oso Cloud","sidebarTitle":"Introduction","href":"/reference/polar/introduction"},{"title":"Polar Rules and Facts","sidebarTitle":"Rules and Facts","href":"/reference/polar/rules-and-facts"},{"title":"Facts as Data","sidebarTitle":"Facts as Data","href":"/reference/polar/facts-as-data"},{"title":"Polar Built-In Types","sidebarTitle":"Types","href":"/reference/polar/types"},{"title":"Polar Operators","sidebarTitle":"Operators","href":"/reference/polar/operators"},{"title":"Resource Blocks","sidebarTitle":"Resource Blocks","href":"/reference/polar/resource-blocks"},{"title":"Polar Polymorphism","sidebarTitle":"Extends","href":"/reference/polar/extends"},{"title":"Polar Built-In Constants","sidebarTitle":"Constants","href":"/reference/polar/constants"},{"title":"Polar Tests","sidebarTitle":"Tests","href":"/reference/polar/tests"}]},{"group":"HTTP API","pages":[{"group":"Policies","pages":[{"openapi":"get /policy","title":null,"href":"/reference/api/policy/get-policy"},{"openapi":"get /policy_metadata","title":null,"href":"/reference/api/policy/get-policy_metadata"},{"openapi":"post /policy","title":null,"href":"/reference/api/policy/post-policy"}]},{"group":"Facts","pages":[{"openapi":"post /batch","title":null,"href":"/reference/api/centralized-authorization-data/post-batch"},{"openapi":"post /clear_data","title":null,"href":"/reference/api/centralized-authorization-data/post-clear_data"},{"openapi":"post /facts","deprecated":true,"title":null,"href":"/reference/api/centralized-authorization-data/post-facts"},{"openapi":"post /bulk","deprecated":true,"title":null,"href":"/reference/api/centralized-authorization-data/post-bulk"},{"openapi":"post /bulk_load","deprecated":true,"title":null,"href":"/reference/api/centralized-authorization-data/post-bulk_load"},{"openapi":"post /bulk_delete","deprecated":true,"title":null,"href":"/reference/api/centralized-authorization-data/post-bulk_delete"},{"openapi":"delete /facts","deprecated":true,"title":null,"href":"/reference/api/centralized-authorization-data/delete-facts"}]},{"group":"Authorization Check","pages":[{"openapi":"post /actions","title":null,"href":"/reference/api/check-api/post-actions"},{"openapi":"post /authorize_resources","title":null,"href":"/reference/api/check-api/post-authorize_resources"},{"openapi":"post /authorize","title":null,"href":"/reference/api/check-api/post-authorize"},{"openapi":"post /evaluate_query","title":null,"href":"/reference/api/check-api/post-evaluate_query"},{"openapi":"post /list","title":null,"href":"/reference/api/check-api/post-list"},{"openapi":"post /query","deprecated":true,"title":null,"href":"/reference/api/check-api/post-query"}]},{"group":"Local Authorization Check","pages":[{"openapi":"post /actions_query","title":null,"href":"/reference/api/local-check-api/post-actions_query"},{"openapi":"post /authorize_query","title":null,"href":"/reference/api/local-check-api/post-authorize_query"},{"openapi":"post /evaluate_query_local","title":null,"href":"/reference/api/local-check-api/post-evaluate_query_local"},{"openapi":"post /list_query","title":null,"href":"/reference/api/local-check-api/post-list_query"}]},{"group":"Policy","pages":[{"title":"Get policy","deprecated":null,"version":null,"openapi":"/reference/openapi.json get /policy","href":"/api-reference/policy/get-policy"},{"title":"Post policy","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /policy","href":"/api-reference/policy/post-policy"},{"title":"Get policy metadata","deprecated":null,"version":null,"openapi":"/reference/openapi.json get /policy_metadata","href":"/api-reference/policy/get-policy_metadata"}]},{"group":"Centralized Authorization Data","pages":[{"title":"Post facts","deprecated":true,"version":null,"openapi":"/reference/openapi.json post /facts","href":"/api-reference/centralized-authorization-data/post-facts"},{"title":"Delete facts","deprecated":true,"version":null,"openapi":"/reference/openapi.json delete /facts","href":"/api-reference/centralized-authorization-data/delete-facts"},{"title":"Post bulk load","deprecated":true,"version":null,"openapi":"/reference/openapi.json post /bulk_load","href":"/api-reference/centralized-authorization-data/post-bulk_load"},{"title":"Post bulk delete","deprecated":true,"version":null,"openapi":"/reference/openapi.json post /bulk_delete","href":"/api-reference/centralized-authorization-data/post-bulk_delete"},{"title":"Post bulk","deprecated":true,"version":null,"openapi":"/reference/openapi.json post /bulk","href":"/api-reference/centralized-authorization-data/post-bulk"},{"title":"Post batch","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /batch","href":"/api-reference/centralized-authorization-data/post-batch"},{"title":"Post clear data","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /clear_data","href":"/api-reference/centralized-authorization-data/post-clear_data"}]},{"group":"Check API","pages":[{"title":"Post authorize","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /authorize","href":"/api-reference/check-api/post-authorize"},{"title":"Post authorize resources","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /authorize_resources","href":"/api-reference/check-api/post-authorize_resources"},{"title":"Post list","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /list","href":"/api-reference/check-api/post-list"},{"title":"Post actions","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /actions","href":"/api-reference/check-api/post-actions"},{"title":"Post query","deprecated":true,"version":null,"openapi":"/reference/openapi.json post /query","href":"/api-reference/check-api/post-query"},{"title":"Post evaluate query","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /evaluate_query","href":"/api-reference/check-api/post-evaluate_query"}]},{"group":"Local Check API","pages":[{"title":"Post actions query","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /actions_query","href":"/api-reference/local-check-api/post-actions_query"},{"title":"Post authorize query","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /authorize_query","href":"/api-reference/local-check-api/post-authorize_query"},{"title":"Post list query","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /list_query","href":"/api-reference/local-check-api/post-list_query"},{"title":"Post evaluate query local","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /evaluate_query_local","href":"/api-reference/local-check-api/post-evaluate_query_local"}]}]},{"group":"SDKs","pages":[{"title":"Oso Cloud SDKs","sidebarTitle":"Overview","href":"/reference/sdks/overview"},{"title":"Installation and Setup","sidebarTitle":"Install","href":"/reference/sdks/install"},{"title":"Policy Management","sidebarTitle":"Policies","href":"/reference/sdks/policies"},{"title":"Facts Management","sidebarTitle":"Facts","href":"/reference/sdks/facts"},{"title":"Authorization Checks","sidebarTitle":"Authorization Checks","href":"/reference/sdks/authorization-checks"},{"title":"Local Authorization","sidebarTitle":"Local Authorization","href":"/reference/sdks/local-authorization"},{"title":"Migration Guide","sidebarTitle":"Migration Guide","href":"/reference/sdks/migration-guide"},{"title":"SDK Specific Guidance","sidebarTitle":"SDK Specific Guidance","href":"/reference/sdks/sdk-specific-guidance"},{"group":"Integrations","pages":[{"title":"SQLAlchemy Local Authorization Integration","sidebarTitle":"SQLAlchemy","href":"/reference/sdks/integrations/sqlalchemy"},{"title":"Mcp","href":"/reference/sdks/integrations/mcp"}]},{"group":"Changelog","pages":[{"title":"What's New in Oso Cloud","sidebarTitle":"What's New","href":"/reference/sdks/changelog/whats-new"},{"title":"CLI Changelog","sidebarTitle":"CLI","href":"/reference/sdks/changelog/oso-cloud-cli"},{"title":"Node.js SDK Changelog","sidebarTitle":"Node.js","href":"/reference/sdks/changelog/nodejs"},{"title":"Python SDK Changelog","sidebarTitle":"Python","href":"/reference/sdks/changelog/python"},{"title":"Ruby SDK Changelog","sidebarTitle":"Ruby","href":"/reference/sdks/changelog/ruby"},{"title":"Java SDK Changelog","sidebarTitle":"Java","href":"/reference/sdks/changelog/java"},{"title":"Go SDK Changelog","sidebarTitle":"Go","href":"/reference/sdks/changelog/go"},{"title":".NET SDK Changelog","sidebarTitle":".NET","href":"/reference/sdks/changelog/dotnet"},{"title":"Fallback Node Changelog","sidebarTitle":"Fallback Node","href":"/reference/sdks/changelog/fallback"},{"title":"Dev Server Changelog","sidebarTitle":"Dev Server","href":"/reference/sdks/changelog/oso-dev-server"},{"title":"VSCode Extension Changelog","sidebarTitle":"VSCode Extension","href":"/reference/sdks/changelog/vscode-extension"}]}]}]},{"dropdown":"Learn","icon":"graduation-cap","groups":[{"group":"Tutorials","pages":[{"title":"An End-to-End Example Securing a Real World App with Oso Cloud","sidebarTitle":"End-to-End Example","href":"/learn/tutorials/end-to-end-example"},{"title":"An illustration of a local development workflow for Oso Cloud","sidebarTitle":"Workflow Walkthrough","href":"/learn/tutorials/workflow-walkthrough"}]},{"group":"Guides","pages":[{"group":"Adopt Local Authorization","pages":[{"title":"Getting started","href":"/learn/guides/adopt-local-authorization/getting-started"},{"title":"Extract authorization logic","href":"/learn/guides/adopt-local-authorization/extract-logic"},{"title":"Implement in Oso Cloud","href":"/learn/guides/adopt-local-authorization/implement-in-oso-cloud"},{"title":"Send data as context facts","href":"/learn/guides/adopt-local-authorization/data-as-context-facts"},{"title":"Replace Context Facts with Local Authorization","sidebarTitle":"Replace with local authorization","href":"/learn/guides/adopt-local-authorization/replace-with-local-authorization"},{"title":"Authorize with Oso Cloud","href":"/learn/guides/adopt-local-authorization/authorize-with-oso-cloud"}]},{"title":"How to map relational data to facts","sidebarTitle":"Map Relational Data to Facts","href":"/learn/guides/map-relational-data-to-facts"},{"title":"Best Practices for Frontend Authorization","sidebarTitle":"Frontend (UI)","href":"/learn/guides/ui"},{"title":"Integrating Authentication (Identity) Data","sidebarTitle":"Authentication","href":"/learn/guides/authentication"}]}]}]}]},"basePath":"","title":"Time-based Checks - Oso Cloud Documentation","buildId":"dpl_6cCEiK8XNNvaLBBkWzcBhdE9QfLC","deploymentId":"dpl_6cCEiK8XNNvaLBBkWzcBhdE9QfLC","dynamics":["10e4515597"],"chunks":["BannerMarkdown-CGuHEvQW.js","dist-B66mVNPp.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-BcghKhHb.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}