From 6d3053ead8224a258d468c537ba8be10d195bdd8 Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Mon, 13 Nov 2023 13:14:12 -0500 Subject: [PATCH 1/2] chore: support new authz API --- src/auth.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/auth.mjs b/src/auth.mjs index d2fff08..326014b 100644 --- a/src/auth.mjs +++ b/src/auth.mjs @@ -13,16 +13,16 @@ export const checkAgainstAuthorizationService = async (token) => { } try { - const res = await fetch(`${BENTO_AUTHZ_SERVICE_URL}policy/evaluate`, { + const res = await fetch(`${BENTO_AUTHZ_SERVICE_URL}policy/evaluate_one`, { method: "POST", headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json", }, body: JSON.stringify({ - requested_resource: {everything: true}, + resource: {everything: true}, // TODO: granular permissions + message filtering instead: - required_permissions: ["view:private_portal"], + permission: "view:private_portal", }), agent: httpsAgent, }); From cd8233cbfc2d6929b5969aad318d3e17bffbdbec Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Mon, 13 Nov 2023 13:17:13 -0500 Subject: [PATCH 2/2] chore: bump version to 3.1.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 803fc40..4086425 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bento_event_relay", - "version": "3.0.2", + "version": "3.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "bento_event_relay", - "version": "3.0.2", + "version": "3.1.0", "license": "LGPL-3.0-only", "dependencies": { "node-fetch": "^3.3.2", diff --git a/package.json b/package.json index ae8df21..9bca921 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bento_event_relay", - "version": "3.0.2", + "version": "3.1.0", "description": "Event relay service from Redis PubSub to socket.io", "main": "src/index.mjs", "scripts": {