Skip to content

Commit

Permalink
Removed some commented lines, addded licence header to filters script…
Browse files Browse the repository at this point in the history
…s and improved a little on the docs instructions, also moved the copy of the filters from the mapping volume on the docker-compose to the Dockerfile, so those files can be copied and included with the image at build time

Signed-off-by: Alfredo Gutierrez <[email protected]>
  • Loading branch information
AlfredoG87 committed Jan 18, 2024
1 parent 80b4b9a commit 78b5e98
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 6 deletions.
6 changes: 3 additions & 3 deletions envoy-auth-layer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM envoyproxy/envoy:v1.28-latest
# copy envoy.yaml to the container
#COPY envoy.yaml /etc/envoy/envoy.yaml
#RUN chmod go+r /etc/envoy/envoy.yaml

# Copy the Filter Scripts
COPY /filters/ /filters/

# Install Lua and Luarocks
RUN apt-get update && apt-get install -y lua5.1 luarocks git
Expand Down
5 changes: 4 additions & 1 deletion envoy-auth-layer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@ CREATE TABLE IF NOT EXISTS auth.permissions
INSERT INTO auth.permissions(
id, token, method, param_name)
VALUES (1, 'Bearer 12345', 'deploy_subgraph', 'test');
VALUES (1, 'Bearer 12345', 'subgraph_create', 'test');
INSERT INTO auth.permissions(
id, token, method, param_name)
VALUES (1, 'Bearer 12345', 'subgraph_deploy', 'test');
```

Expand Down
3 changes: 1 addition & 2 deletions envoy-auth-layer/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ version: '3'
services:
envoy:
image: envoy-auth-layer:latest
command: -c /configs/envoy-auth-redis.yaml
command: -c /configs/envoy-auth-pg-db.yaml
env_file:
- .env
volumes:
- ./configs/:/configs/
- ./filters/:/filters/
ports:
- "9901:9901"
- "10000:10000"
Expand Down
20 changes: 20 additions & 0 deletions envoy-auth-layer/filters/JsonValidationFilter.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*-
*
* Hedera JSON RPC Relay
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

local cjson = require "cjson"

function envoy_on_request(request_handle)
Expand Down
20 changes: 20 additions & 0 deletions envoy-auth-layer/filters/TokenVerificationPgFilter.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*-
*
* Hedera JSON RPC Relay
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

local cjson = require("cjson")
local luasql = require("luasql.postgres")

Expand Down
20 changes: 20 additions & 0 deletions envoy-auth-layer/filters/TokenVerificationRedisFilter.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*-
*
* Hedera JSON RPC Relay
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

local cjson = require("cjson")
local redis = require 'redis'

Expand Down

0 comments on commit 78b5e98

Please sign in to comment.