diff --git a/CHANGELOG.md b/CHANGELOG.md index df96046..e1abd67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +### Changed + +### Fixed + +### Removed + +### Deprecated + +### Security + +## [0.1.0-1] - 2025-01-06 + +### Added + - Initial implementation of plugin - Added GitHub action build for linting and unit testing - Added function to handle unexpected errors and exit the plugin @@ -23,7 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Extracted `kong.response.exit(500, "An unexpected error occurred")` to its own function - Extracted the code inside the `repeat ... until` loop into its own function - Modified `make_fga_request` to return a boolean indicating allow/deny -- For local development, a kong-*dev-0.rockspec file is used to install the plugin. This helps segregate +- For local development, a kong-\*dev-0.rockspec file is used to install the plugin. This helps segregate the testing from the release process. - Changed the rockspec license to MIT. diff --git a/README.md b/README.md index 97a1454..dd295b2 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ The goal of this plugin is to integrate Kong with OpenFGA for fine-grained autho ## Installation -Install the plugin using `luarocks`. @TODO: The package is not yet hosted on LuaRocks or as an release asset on GitHub. +Install the plugin using `luarocks`. ```sh -luarocks install kong-plugin-kong-authz-openfga-0.1.0-1.all.rock +luarocks install kong-plugin-kong-authz-openfga ``` ## Enable it in Kong @@ -254,7 +254,7 @@ make clean ## Run CI lint, unit and integration tests -@TODO: Add build, test, and deploy pipeline (GitHub Actions) to the project +The project integrates with GitHub Actions for CI. The CI pipeline runs the lint, unit and integration tests. ## Test against a different Kong version @@ -280,7 +280,7 @@ The project bundles a mock server for OpenFGA. ### CI container image -@TODO: TBD +The CI container image can be found under \_build/images/kong-tooling/Dockerfile. The image is based on the official Kong image and contains all the necessary tools to run the lint, unit and integration tests. ## Recommended Visual Studio Code extensions @@ -301,7 +301,7 @@ The project bundles a mock server for OpenFGA. 7. Commit the changes, create a tag and push changes and tag to the remote repository 1. `git add plugin.properties *.rockspec README.md kong/plugins/*/handler.lua CHANGELOG.md` 2. `git commit -m "Release x.y.z-r"` - 3. `git tag x.y.z-r` + 3. `git tag vx.y.z-r` 4. `git push` 5. `git push --tags` 8. @TODO: Add step to perform a release in GitHub diff --git a/kong-plugin-kong-authz-openfga-0.1.0-1.rockspec b/kong-plugin-kong-authz-openfga-0.1.0-1.rockspec new file mode 100644 index 0000000..6a54e87 --- /dev/null +++ b/kong-plugin-kong-authz-openfga-0.1.0-1.rockspec @@ -0,0 +1,22 @@ +package = "kong-plugin-kong-authz-openfga" +version = "0.1.0-1" +source = { + url = "git+https://github.com/dol/kong-authz-openfga.git", + tag = "v0.1.0-1" +} +description = { + summary = "Kong plugin for kong-authz-openfga integration", + homepage = "https://github.com/dol/kong-authz-openfga", + license = "MIT" +} +dependencies = { + "lua ~> 5.1" +} +build = { + type = "builtin", + modules = { + ["kong.plugins.kong-authz-openfga.access"] = "kong/plugins/kong-authz-openfga/access.lua", + ["kong.plugins.kong-authz-openfga.handler"] = "kong/plugins/kong-authz-openfga/handler.lua", + ["kong.plugins.kong-authz-openfga.schema"] = "kong/plugins/kong-authz-openfga/schema.lua" + } +}