Skip to content
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

information required #149

Closed
ameerhu opened this issue Aug 28, 2021 · 4 comments
Closed

information required #149

ameerhu opened this issue Aug 28, 2021 · 4 comments
Labels

Comments

@ameerhu
Copy link

ameerhu commented Aug 28, 2021

Is it still available for java 8?
Or I have to switch into java 11?

When I tried to add dependency in POM.xml for the spring boot project. It doesn't resolve the dependency and throw following error.

Cannot resolve org.openpolicyagent:voter:1.0-SNAPSHOT

@anderseknert
Copy link
Member

Should work with Java 8. Looks like you are skipping the step before that?

mvn install:install-file -Dfile=target/voter-1.0-SNAPSHOT.jar -DpomFile=pom.xml

The jar isn't published to Maven Central, so you'll need to build and deploy it to your own repository.

@ameerhu
Copy link
Author

ameerhu commented Aug 29, 2021

That's great. you are right, It works now.
Can we use it to authorize the user as well or it can be only use to communicate between the microservers or application?

If we can use it to authorize the user then how could I dynamically verify the permission of the user by database? I mean I don't have only one user, I have multiple users in the database and I want to allow only if the subject Id equal to the one of the id exists in my database.
Can you guide me here or show me the tutorial from where I can learn. Thanks!

@anderseknert
Copy link
Member

Sure you can! The input object provided to OPA is built here, so you could modify that to include whatever you need.

See the documentation on external data for how to get data from e.g. a database into your OPA instances. For most cases the bundle model is a pretty good default choice.

@anderseknert
Copy link
Member

Anything left unanswered here or are we good to close this @ameerhu?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants