Skip to content

Commit

Permalink
feat: update to Cedar 3.x (#29)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Hakanson <kevhak@amazon.com>
  • Loading branch information
hakanson authored Sep 26, 2024
1 parent 01568c0 commit 2376ad1
Show file tree
Hide file tree
Showing 33 changed files with 1,723 additions and 612 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
## v0.6.4 (Pre-release) 2024-06-03
## v0.8.0 (Preview) 2024-09-26

- Update to Cedar 3.4.1
- Human-readable schema IntelliSense, validation, and translation

## v0.6.4 (Preview) 2024-06-03

- Update to Cedar 2.4.7

## v0.6.3 (Pre-release) 2024-05-17
## v0.6.3 (Preview) 2024-05-17

- Update to Cedar 2.4.6
- Human-readable schema syntax highlighting
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ The Cedar policy language extension for Visual Studio Code supports syntax highl

Cedar is an open-source language for writing authorization policies and making authorization decisions based on those policies. Visit the [Cedar policy language reference guide](https://docs.cedarpolicy.com/) for the documentation and the language specification.

**Note:** The release version of this extension uses Cedar 2.x. Switch to Pre-Release Version for Cedar 3.x features.
**Note:** The release version of this extension uses Cedar 3.x.

## Features

### Cedar policy language

Files matching `*.cedar` are detected as a Cedar policy language and receive syntax highlighting. Validation is performed on document open, document save, during formatting, and via context menu. IntelliSense for entity types and attributes. Formatting can disabled per file using a leading comment line of `// @formatter:off`. Policy navigation using Outline or Breadcrumb. "Go to Definition" on Cedar entity types and action names. Policies exportable to their JSON representation.
Files matching `*.cedar` are detected as a Cedar policy language and receive syntax highlighting. Validation is performed on document open, document save, during formatting, and via context menu. IntelliSense for entity types and attributes. Formatting can disabled per file using a leading comment line of `// @formatter:off`. Policy navigation using Outline or Breadcrumb. "Go to Definition" on Cedar entity types and action names. Policies are exportable to their JSON representation (`*.cedar.json`) and receive syntax highlighting.

![Cedar policy validation and navigation](https://raw.githubusercontent.com/cedar-policy/vscode-cedar/main/docs/marketplace/cedar_policy.gif)

### Cedar schema

Files named `cedarschema.json` or matching `*.cedarschema.json` are detected as a Cedar schema and receive additional syntax highlighting. Validation is performed on document open, document save, and via context menu. When a Cedar schema file is detected or configured in [Settings](#settings), additional validation of Cedar files uses that schema. Entity type navigation using Outline or Breadcrumb. "Go to Definition" on Cedar entity types and action names.
Files named `cedarschema` or matching `*.cedarschema` are detected as a Cedar schema and receive additional syntax highlighting. Validation is performed on document open, document save, and via context menu. When a Cedar schema file is detected or configured in [Settings](#settings), additional validation of Cedar files uses that schema. Entity type navigation using Outline or Breadcrumb. "Go to Definition" on Cedar entity types and action names. The Cedar schema JSON format is supported for files named `cedarschema.json` or matching `*.cedarschema.json`.

![Cedar schema validation and navigation](https://raw.githubusercontent.com/cedar-policy/vscode-cedar/main/docs/marketplace/cedar_schema.gif)

Expand All @@ -32,7 +32,7 @@ Various commands of the `cedar` CLI take JSON formatted file inputs. Files name

### Markdown

Syntax highlighting of `cedar` code fence blocks within markdown (`*.md`) files.
Syntax highlighting of `cedar` and `cedarschema` code fence blocks within markdown (`*.md`) files.

![Cedar markdown syntax highlighting](https://raw.githubusercontent.com/cedar-policy/vscode-cedar/main/docs/marketplace/cedar_markdown.png)

Expand All @@ -54,11 +54,11 @@ Sample `.vscode/settings.json` which enables `editor` settings for `cedar` files
"editor.formatOnSave": true,
"editor.defaultFormatter": "cedar-policy.vscode-cedar",
},
"cedar.schemaFile": "tinytodo.cedarschema.json",
"cedar.schemaFile": "tinytodo.cedarschema",
"cedar.autodetectSchemaFile": true,
}
```

## Troubleshooting

Submit bug reports and feature requests [on our Github repository](https://github.com/cedar-policy/vscode-cedar/issues). For potential security issues, visit [reporting a vulnerability](https://github.com/cedar-policy/vscode-cedar/security/policy) for instructions.
Submit bug reports and feature requests [on our GitHub repository](https://github.com/cedar-policy/vscode-cedar/issues). For potential security issues, visit [reporting a vulnerability](https://github.com/cedar-policy/vscode-cedar/security/policy) for instructions.
Binary file modified docs/marketplace/cedar_commands.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/marketplace/cedar_entities.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/marketplace/cedar_markdown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/marketplace/cedar_policy.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/marketplace/cedar_schema.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2376ad1

Please sign in to comment.