-
Notifications
You must be signed in to change notification settings - Fork 47
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
Developing a custom user registry with BELLS #2418
Comments
Great work @Rwalls1 ! Please publish the doc. Thank you! |
Ok, I think we need to put this topic on hold for now, for several reasons (sorry for the delay in reviewing, I've been trying to look into a few different aspects of it since starting reviewing it last week):
I think there is also an issue around the goal of the topic. I realise there wasn't much info to go on in the issue and I didn't understand the content of the draft WASdev article properly. The title of this new doc topic says it's about configuring the custom user registry using BELLs (which is what I assumed the WASdev article to be about) but actually that's only a tiny part of it. Most of it (as in the original WASdev draft article) is actually about writing an app to verify the configuration which, while potentially useful to some users, is not the same thing and I don't think we have a high priority for a topic about that at the moment. The configuration is taken care of in the BELLs feature topic, which @Rwalls1 is also working on (#2417). At this stage, how to write an app for verification isn't high enough priority relative to the other docs users need and would sit oddly with the rest of our information so far, implying users should be writing/configuring custom user registries instead of using the capabilities provided already. This topic would take enough work to make it relevant to Open Liberty that I'm going to suggest we put this issue in the Icebox for now until we have a good requirement for doing more with it. |
Someone else is also having trouble with this: https://groups.io/g/openliberty/topic/80768611 |
It was me... And I must confirm that the available documentation in Knowledge Center is quite confusing. Creating an ESA file for a beginner is almost impossible. In my case with the Custom User Registry BELL saved the day. It was actually quite easy to implement, easy to understand, and also filled a very wanted use case; to create a more flexible user repository without install a LDAP server. For minor applications ( i.e one application runing on just one instance of Liberty, and the need for a user repository managed by the application itself). I rewrote to sample to use the user database from the application itself, and it works like a charm ... But it was a long road, involving IBM support, but luckily @una-tapa come to rescue since I also went the groups.io way. Just missing the option to pass inn configuration properties to BELL.... |
This is something that I'd also like to know how to do it in the intended way. I think I understand how to use BELL to register a UserRegistry, but I'd also like to access the configured data source. @bwa In the groups.io thread I see that you were looking for a way to access the data source, too. Have you found a solution? |
Hello @treo This is what I shared with @bwa . I had a chance to chat with him. He seems to be using this variable method! Sample 1
Sample 2
Credit goes to @aguibert He left a lot of good info. |
bwa also asked really good questions that I got to chat with architects. I am leaving it here so we will get it documented (hopefully)
|
The datasource works fine, but the configuration is not possible from server.xml. System environment variables will work, but I has been encouraged to open a RFE for this. Will share it here to get more votes. So the solution is to 'hardcode' the jndi name in the CustomUserRegistry and manage the datasource in server.xml |
Reopening this issue to get this info into the Open Liberty docs. |
I've played around with this for a bit (created a user registry that does nothing but allows me to set a break point into it 😄). I guessed that I'll have to get the DataSource via JNDI, and getting it with something along the lines of the following works just fine:
And just as you, I have found that I need a way to specify the JNDI resource name. But as my application does use MicroProfile Config, I can get things via And while that does hardcode a variable name, it is better than hardcoding the JNDI name. The biggest hurdle to making this "just work" for my setup, is to figure out where the UserRegistry interface can be found to be declared as a maven dependency. For my exploration today, I've just directly pointed the project to the But as I'd like to continue using Maven to build the entire project, I'll have to figure out a way to do it properly. Edit:
Now, I can have a simple multi-module project in maven, and tell the open liberty maven plugin to install my registry in the correct place and hopefully that will also package just fine into the open liberty uberjar. |
@treo Sweeet. I was also using maven to build, but had my good old was_public jar available to compile. This was better. Thanks! |
This doc needs more input from the SME before moving forward with strategy and development. The SME doesn't currently have time to contribute so moving to Icebox. |
I recently worked on a couple of customer questions regarding how to configure bells. I remembered @bwa 's suggestion creating a simple maven repository so I tried out. It worked so well with our pre-made User Registry (also used for the OSGi feature sample) @treo 's update here was helpful to create the dependency. I configured the user registry that came out of the maven project with Liberty Docker container. I am posting for your review. I am hoping to get it WASDev so our L2 could just point customer to it. Thanks in advance! |
Hi Hiroko, thanks- I took a quick look and I agree this could be a good addition to the wasdev repo, and could possibly be adapted for the docs from there. As afar as a reviewe, I see a few edits that could be made for clarity, and also a few questions raised. Should I open a PR against the README for suggestions/questions? |
Thanks for looking & considering to doc. It will really help reduce our support work (One of them was SEV1..) I will appreciate your review and PR on the README but since it is still my personal repository, I hope to get it on WASDev first so your PR work will be counted as the WASDev contribution (not to my personal repo). By any chance, do you know who can create a repo for this bells UR sample? |
@dmuelle @lauracowen cc: @arkarkala We recently worked on a high sev customer case. The customer created their own custom user registry with BELLS. We later found they needed a small update in their CUR to get it working. We were able to get the issue resolved by pointing my personal repo as a sample (https://github.com/una-tapa/bellscur) The bells UR questions comes up from time to time. Thanks in advance! |
@dmuelle - I consulted with @dazavala in this Slack thread His suggestion was to use my sample, and it helped convince customer to look at their code.
I think this is my last try to make an official CUR sample available, if it does not happen, I will just move on. |
Thank you @lauracowen for the repo. I will post the Bells CUR sample -Parts of the code/config were contributed by our customers @bwa @treo and @ggam. Glad it will be under WASDev. Just today, I got a notification that the following Bell feature was delivered and closed. I might update the sample with the function @dazavala made available. |
rework this unpublished wasDev article into an Open Liberty task topic for the Security section. Needs to be verified and tested. SME: @una-tapa
The text was updated successfully, but these errors were encountered: