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

Use a ServiceLoader to discover WebEnvironments #53

Closed
wants to merge 2 commits into from

Conversation

bdemers
Copy link
Member

@bdemers bdemers commented Dec 16, 2016

The idea here is to lessen the touch points for frameworks when integrating with Shiro. A property file and a WebEnvironment implementation should be all that is needed. The WebEnvironment can then provide additional defaults or customizations specific to that framework.

https://issues.apache.org/jira/browse/SHIRO-608

@bdemers
Copy link
Member Author

bdemers commented Jan 11, 2017

@leleuj added a couple tests and fixed a couple minor bugs.

It should be ready to go, but I still want input from buiji before merging

@bdemers bdemers changed the title IDEA: use a ServiceLoader to discover WebEnvironments Use a ServiceLoader to discover WebEnvironments Jan 11, 2017
@leleuj
Copy link
Contributor

leleuj commented Jan 12, 2017

It looks good to me, yet the real implementation in buji-pac4j will be necessary to confirm everything is ok. I plan to release buji-pac4j v2.0.4 next week, but then I'll be able to handle that.

@bdemers
Copy link
Member Author

bdemers commented Jan 12, 2017

Great! keep me posted!

@leleuj
Copy link
Contributor

leleuj commented Jan 16, 2017

On my way to release buji-pac4j, I just saw that the latest Shiro version is 1.4.0-RC2. Is there any plan/date for a GA release?

@bdemers
Copy link
Member Author

bdemers commented Jan 16, 2017 via email

@leleuj
Copy link
Contributor

leleuj commented Jan 18, 2017

OK. So I'm releasing a version 2.1.0-RC1 first (to accomodate wih 1.4.0-RC2).

@bdemers
Copy link
Member Author

bdemers commented Feb 13, 2017

@leleuj bump

Sorry to bug you, is there anything I can do to help move this along?

@leleuj
Copy link
Contributor

leleuj commented Feb 14, 2017

No problem, I'm done with pac4j version 2.0.0-RC1. I will work on that (maybe without upgrading to pac4j v2 though). I'll keep you posted.

@leleuj
Copy link
Contributor

leleuj commented Feb 14, 2017

Fairly straightforward!

Is this what you had in mind: bujiio/buji-pac4j#54 + pac4j/buji-pac4j-demo#12? Thanks

@bdemers
Copy link
Member Author

bdemers commented Feb 14, 2017

@leleuj defiantly the first step.

I'm not sure this works for that demo project but, hacked up the PR's you mentioned to give an idea what I'm talking about (these both depend on this PR):

First, define the service def:
bdemers/buji-pac4j@dad7f34

The use it automatically:
bdemers/buji-pac4j-demo@d51d550

I also swapped out the web.xml config for shiro's servlet fragment, but that is optional, just trying to demonstrate removing all of the basic config.

This should allow any framework to inject itself into the Shiro's configuration by just including a dependency. Making it easier to get started with Shiro through another framework: Buji, Stormpath, Apache Zeppelin, Apache Geode, etc.

Thoughts?

@leleuj
Copy link
Contributor

leleuj commented Feb 15, 2017

OK. I see. But for sure, I tested it and it was working. But it's a lot better indeed to have this automatically detected. Is there some documentation somewhere? I couldn't find it.

Will update and test it again.

@leleuj
Copy link
Contributor

leleuj commented Feb 15, 2017

I updated the PR and tested your suggestions but it doesn't work, although it looks good. I tested everything with a local built Shiro and your PR merged in.

Am I missing something?

@bdemers
Copy link
Member Author

bdemers commented Feb 20, 2017 via email

@leleuj
Copy link
Contributor

leleuj commented Feb 22, 2017

OK. It's clearer now and the Pac4jIniEnvironment is automatically loaded (via the org.apache.shiro.web.env.WebEnvironment file).

I merged both PR: the new version buji-pac4j 2.2 is ready. I guess we said we would wait for the final 1.4.0 release of Shiro before releasing again buji-pac4j: what's the next step?

@bdemers
Copy link
Member Author

bdemers commented Feb 22, 2017

Great!

I'll clean this up a bit, check test coverage, javadoc etc, and merge it.

@leleuj
Copy link
Contributor

leleuj commented Mar 15, 2017

Coming back on this. I don't see any recent snapshot in the Apache repository. Can you merge this pull request?
When do you plan the 1.4.0 release? Thanks

@bdemers
Copy link
Member Author

bdemers commented Mar 16, 2017 via email

@leleuj
Copy link
Contributor

leleuj commented Mar 16, 2017

Thanks. Keep me posted for the release as well.

@leleuj
Copy link
Contributor

leleuj commented Apr 11, 2017

@bdemers Can we merge that pull request? I'm flooded by complaints on the buji-pac4j-demo as it doesn't work, waiting for this PR. Thanks.
And plan a release...

asfgit pushed a commit that referenced this pull request Apr 12, 2017
Added test for EnvironmentLoader when using a ServiceLoader

Fixes: SHIRO-608, #53
@bdemers
Copy link
Member Author

bdemers commented Apr 12, 2017

@leleuj sorry about the wait, please feel free to yell at me if this happens again (or the wait is more then a weekend) I got caught up in some travel and forgot about this one.

I just pushed to the ASF, so it should sync here any minute

@leleuj
Copy link
Contributor

leleuj commented Apr 12, 2017

Great! I hate to yell a people doing open source for free ;-)

@bdemers
Copy link
Member Author

bdemers commented Apr 12, 2017

Ha, agreed, but I did said I would do this a while ago, so you would be will in your right to yell :D

Take a look through the open PR's, and see if there is anything that should be merged before we release, I know at least #62 should be, I can look at that tonight or tomorrow night. (and lets move this portion of the conversation to the dev list)

@leleuj
Copy link
Contributor

leleuj commented Apr 13, 2017

I see 25 opened PRs: are they really? Because this one is still opened as well.

I don't see anything special, except: #25 I guess we already merged it.
But this needs some cleaning ;-)

@bdemers
Copy link
Member Author

bdemers commented Apr 13, 2017

The github/ASF sync occasionally leaves issues PRs open if they are not tagged correctly.

We also don't have the ability to add labels to the PRs. A while back I went through the JIRA's and converted patches into Pull Requests, but that probably adds confusion. I'll go through them and mark the closed with a noticed to comment to reopen (they will still be linked to the original JIRA, so should still be valuable if anyone wants to pick them up)

That will leave a smaller handful for consideration. If you see anything that you feel is more important then others please add comment in that issue.

(note: the ASF infra is working on support these Github issues, so it should not always be like this)

@leleuj
Copy link
Contributor

leleuj commented Apr 18, 2017

Given we already have a RC2, I would not add anything more for the final release.

@leleuj
Copy link
Contributor

leleuj commented Apr 27, 2017

Reminder: @bdemers the final release is expected very soon...

@bdemers bdemers closed this Apr 30, 2017
@bdemers bdemers reopened this Apr 30, 2017
@bdemers
Copy link
Member Author

bdemers commented Apr 30, 2017

Already merged

@bdemers bdemers closed this Apr 30, 2017
@bdemers
Copy link
Member Author

bdemers commented May 1, 2017

@leleuj Sorry again about the wait. I've been crazy busy
I took a quick look through the PRs and merged one that was a fix for new dev in 1.4, and another minor issue SHIRO-559

If you want to head up the next release, i can help with support

@leleuj
Copy link
Contributor

leleuj commented May 1, 2017

Is this the right process to follow: https://cwiki.apache.org/confluence/display/SHIRO/Performing+a+Release?

I have a bunch of pac4j releases to perform this week, so I can handle it also in my "release week".

@bdemers
Copy link
Member Author

bdemers commented May 4, 2017

👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants