-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access Denied when using apoc.import #482
Comments
Looking at the APOC docs, the options for using S3 are: The S3 URL must be in the following format:
I am not sure I entirely understood what you meant by "Only when permissions are added to the node role, then it works." |
Yes, even with the command as specified in the 3rd example, it fails
Here are the environment variables
"Only when permissions are added to the node role, then it works." - When the node where the pod is running on has the S3 policies attached to it, the apoc command works. Seems like its using the permissions from the node rather than the service account. |
Looking at the code, if the access and secret key are not passed in the url (the first 2 options), then APOC defaults to use AWS credentials provider chain that looks for credentials in this order:
Do any of these options work for you? I see your env variables aren't including it either. |
hey gem! these are the env variables:
I assumed Is there something i am missing. |
would it have to do with the version of the java sdk? https://neo4j.com/labs/apoc/5/import/web-apis/#_using_s3_protocol |
Right, that env should correspond to the file, hmm the documentation is a little outdated, I have aws-java-sdk-core-1.12.425 locally at least, could you try with that jar? (if that works I'll fix the docs asap :) ) |
Hmm. Your version still fails with access denied. |
same issue with aws-java-sdk-s3/core: |
Any updates regarding this issue? |
Hi, I can't see any immediate issue with APOC as it seems to just be calling a default method in aws sdk, so I'll make a bug card for my team to investigate later :) sorry for the inconvenience! |
Hello @colintkn @KulykDmytro. Could you please try to add another jar to the plugins folder? I think you need:
For the service accounts to work sts needs to be in the classpath, as described in aws/aws-sdk-java#2136. If that fixes the issue, we can add the |
Hi, https://neo4j.com/labs/apoc/5/import/web-apis/#_using_s3_protocol |
We have packaged those dependencies in a single jar that can be downloaded from the extended releases page (still not updated, you should see the new bundled jar with
We have work in progress to update that page you mentioned, so hopefully in a few days we should have better docs on how to add those extra dependencies. |
I've deployed neo4j on kubernetes.
I've created a serviceAccount with annotations to a role which permissions to run S3 commands. The necessary jar files has been downloaded as specified here https://neo4j.com/docs/apoc/5/import/web-apis/#_using_s3_protocol.
The jar files are in the /plugins directory.
But an APOC call will not work in the cypher-shell of the pod.
It yields this error:
Is there a reason why the APOC plugin does not get credentials from the serviceAccount. When the node where the pod is running on has the S3 policies attached to it, then the apoc command works. It seems like APOC is using the permissions from the node rather than the service account.
Here are the configurations
A check on the pod shows the correct role being used
Here are the environment variables from the pod
apoc_config:
configuration:
The text was updated successfully, but these errors were encountered: