cancel
Showing results for 
Search instead for 
Did you mean: 

@auth is not working on deploying to AWS lambda

agchandra
Node

I am trying to deploy my graphql api to aws lambda . I am using neo4j graphql library  where I am facing authentication error. API is working fine if I not add authentication. However on 

extend type VM @auth(rules:[
        {operations: [READ,CREATE,UPDATE,DELETE], roles: ["master"]}
])
I am getting forbidden error in AWS logs
 
Here is the error : 

INFO Neo4jError: Failed to invoke procedure `apoc.util.validate`: Caused by: java.lang.RuntimeException: @neo4j/graphql/FORBIDDEN

at captureStacktrace (/var/task/node_modules/neo4j-driver-core/lib/result.js:239:17)
at new Result (/var/task/node_modules/neo4j-driver-core/lib/result.js:59:23)
at newCompletedResult (/var/task/node_modules/neo4j-driver-core/lib/transaction.js:433:12)
at Object.run (/var/task/node_modules/neo4j-driver-core/lib/transaction.js:287:20)
at Transaction.run (/var/task/node_modules/neo4j-driver-core/lib/transaction.js:137:34)
at Executor.transactionRun (/var/task/node_modules/@neo4j/graphql/dist/classes/Executor.js:131:28)
at /var/task/node_modules/@neo4j/graphql/dist/classes/Executor.js:120:77
at TransactionExecutor._safeExecuteTransactionWork (/var/task/node_modules/neo4j-driver-core/lib/internal/transaction-executor.js:92:26)
at TransactionExecutor._executeTransactionInsidePromise (/var/task/node_modules/neo4j-driver-core/lib/internal/transaction-executor.js:83:34)
at /var/task/node_modules/neo4j-driver-core/lib/internal/transaction-executor.js:40:19
at new Promise (<anonymous>)
at TransactionExecutor.execute (/var/task/node_modules/neo4j-driver-core/lib/internal/transaction-executor.js:39:16)
at Session._runTransaction (/var/task/node_modules/neo4j-driver-core/lib/session.js:315:42)
at Session.readTransaction (/var/task/node_modules/neo4j-driver-core/lib/session.js:293:21)
at Executor.sessionRun (/var/task/node_modules/@neo4j/graphql/dist/classes/Executor.js:120:54)
at Executor.execute (/var/task/node_modules/@neo4j/graphql/dist/classes/Executor.js:50:43) {
constructor: [Function: Neo4jError],
code: 'Neo.ClientError.Procedure.ProcedureCallFailed'
}

 

However my @auth code is working fine on local setup. It is only creating problem on deploying to aws lambda 

currently I am using free version of neo4j aura db

1 REPLY 1

TrevorS
Community Team
Community Team

Hello @agchandra 

Thank you for posting to the Community! I would recommend opening a ticket at https://github.com/neo4j.
Once you create a ticket, reply back to this thread with a link to your post so others who face a similar issue can track the progress of your ticket as well.

Thanks!

TrevorS
Community Specialist
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.