Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Created July 5, 2022 10:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdamBien/1033b6da5d5e75699f0c9c2c44ecb520 to your computer and use it in GitHub Desktop.
Save AdamBien/1033b6da5d5e75699f0c9c2c44ecb520 to your computer and use it in GitHub Desktop.
101stAirhacksQ&A.md

Ask questions and see you at August, 1st, 8.PM. CET: youtube.com/c/bienadam

Also checkout recent episode:

100th airhacks.tv

Please keep the questions Jakarta EE-stic. Means: as short and as concise as only possible. Feel free to ask several, shorter questions. Upcoming airhacks.tv events are also going to be announced at meetup.com/airhacks

@anders97-q
Copy link

Hi Adam,

We have a quarkus based app. It's all reactive using Mutiny. We're also using MongoDB. My question is related to security, authorization specific.
We have our own authorization service. Users are authorized using roles and their permissions. These permissions (for e.g. list.users), can have different constraints for e.g. only list users that begin with a specific character.
So a user role in application can have assigned permission "list.users" but under constraint that he can see only users that begin with specific character.

For every request we build a @RequestScoped class that holds information about current request info (even role and permission and any constraint if any).

Any suggestion from you, how can we implement such case without having to write IF conditions all over the place?
Is there any way to maybe somehow "intercept" mongo queries and add custom Filter based on constraint.
Architecture: We have a rest resource, then a service layer and the repo layer. Where do you think is the best place to build mongo query filters, or how do you think we should approach to resolve this issue?

I couldn't find a way in Quarkus to intercept the mongo query and maybe modify at runtime.

Thanks a lot,
Best regards

@senleft
Copy link

senleft commented Aug 8, 2022

Hi Adam,

I need to understand what exact application version is deployed to the target environment (dev, prod).
One of the solutions could be the endpoint that returns the commit id.
How do you address it on your projects?

Kind regards, Aleksandr

@jogueber
Copy link

jogueber commented Aug 8, 2022

Hi Adam,
have you looked into something like sops for managing your secrets safely in GIT ?
If yes how you integrate that with a java application ?
We experimented with using terragrunt to mount the sops file into the environment.
We really like to also manage our secrets in git obviously we can also store them in SSM but we found that less appealing. What is your preference here?

Best wishes
Johannes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment