shawnmckinney / apache-fortress-demo

Sample web app to demo end-to-end security w/ JavaEE, Spring Security and RBAC fine-grained authorization. All connections use SSL.
Apache License 2.0
19 stars 11 forks source link

Unable to pull RC40-Snapshot #1

Closed ussmith closed 7 years ago

ussmith commented 9 years ago

Hey Shawn,

Where are you publishing your snapshot releases? I get

[ERROR] Failed to execute goal on project apache-fortress-demo: Could not resolve dependencies for project fortressdemo3:apache-fortress-demo:war:1.0-RC40-SNAPSHOT: Failure to find org.apache.directory:fortress-realm-impl:jar:1.0-RC40-SNAPSHOT in https://ci.psu.edu/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of ci has elapsed or updates are forced -> [Help 1]

When trying to run mvn javadoc:javadoc.

Thanks, Shawn

shawnmckinney commented 9 years ago

Hi Shawn - nice name ;-)

Until the first apache fortress release (in the next week or two) you'll need to first build fortress core locally and then you can run the demo's javadoc step. Apologize for this oversight. The readme's been updated with the additional steps needed.

Thanks for letting me know.

Shawn

On Thu, Jan 29, 2015 at 10:25 AM, Shawn Eion Smith <notifications@github.com

wrote:

Hey Shawn,

Where are you publishing your snapshot releases? I get

[ERROR] Failed to execute goal on project apache-fortress-demo: Could not resolve dependencies for project fortressdemo3:apache-fortress-demo:war:1.0-RC40-SNAPSHOT: Failure to find org.apache.directory:fortress-realm-impl:jar:1.0-RC40-SNAPSHOT in https://ci.psu.edu/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of ci has elapsed or updates are forced -> [Help 1]

When trying to run mvn javadoc:javadoc.

Thanks, Shawn

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1.

shawnmckinney commented 9 years ago

At first did not realize it was Shawn @ penn state - good to hear from you again. Let me know if you have any more problems. Once we get that first release to maven this whole procedure will be much simpler. Rather than downloading source code snapshots, the steps will pull directly from maven (like the old quick start). That is what I am working on now and should be ready soon.

On Thu, Jan 29, 2015 at 12:19 PM, Shawn McKinney < shawn.michael.mckinney@gmail.com> wrote:

Hi Shawn - nice name ;-)

Until the first apache fortress release (in the next week or two) you'll need to first build fortress core locally and then you can run the demo's javadoc step. Apologize for this oversight. The readme's been updated with the additional steps needed.

Thanks for letting me know.

Shawn

On Thu, Jan 29, 2015 at 10:25 AM, Shawn Eion Smith < notifications@github.com> wrote:

Hey Shawn,

Where are you publishing your snapshot releases? I get

[ERROR] Failed to execute goal on project apache-fortress-demo: Could not resolve dependencies for project fortressdemo3:apache-fortress-demo:war:1.0-RC40-SNAPSHOT: Failure to find org.apache.directory:fortress-realm-impl:jar:1.0-RC40-SNAPSHOT in https://ci.psu.edu/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of ci has elapsed or updates are forced -> [Help 1]

When trying to run mvn javadoc:javadoc.

Thanks, Shawn

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1.

ussmith commented 9 years ago

I was glad to see this demo go up. It'll help some of the folks here get their head around the concepts. We're getting ready to start writing our skin for the admin console, I'll let you know how progress goes.

On Thu, Jan 29, 2015 at 2:02 PM, Shawn McKinney notifications@github.com wrote:

At first did not realize it was Shawn @ penn state - good to hear from you again. Let me know if you have any more problems. Once we get that first release to maven this whole procedure will be much simpler. Rather than downloading source code snapshots, the steps will pull directly from maven (like the old quick start). That is what I am working on now and should be ready soon.

On Thu, Jan 29, 2015 at 12:19 PM, Shawn McKinney < shawn.michael.mckinney@gmail.com> wrote:

Hi Shawn - nice name ;-)

Until the first apache fortress release (in the next week or two) you'll need to first build fortress core locally and then you can run the demo's javadoc step. Apologize for this oversight. The readme's been updated with the additional steps needed.

Thanks for letting me know.

Shawn

On Thu, Jan 29, 2015 at 10:25 AM, Shawn Eion Smith < notifications@github.com> wrote:

Hey Shawn,

Where are you publishing your snapshot releases? I get

[ERROR] Failed to execute goal on project apache-fortress-demo: Could not resolve dependencies for project fortressdemo3:apache-fortress-demo:war:1.0-RC40-SNAPSHOT: Failure to find org.apache.directory:fortress-realm-impl:jar:1.0-RC40-SNAPSHOT in https://ci.psu.edu/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of ci has elapsed or updates are forced -> [Help 1]

When trying to run mvn javadoc:javadoc.

Thanks, Shawn

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1.

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1#issuecomment-72083237 .

ussmith commented 9 years ago

I think the link you provided to pull the package is incorrect. I was able to clone with https://git-wip-us.apache.org/repos/asf/directory-fortress-core.git successfully.

Cheers, Shawn

shawnmckinney commented 9 years ago

You're right. Made a few more changes to readme. Should be ok now.

On Tue, Feb 3, 2015 at 8:22 AM, Shawn Eion Smith notifications@github.com wrote:

I think the link you provided to pull the package is incorrect. I was able to clone with https://git-wip-us.apache.org/repos/asf/directory-fortress-core.git successfully.

Cheers, Shawn

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1#issuecomment-72657991 .

ussmith commented 9 years ago

We're getting closer. The fortress-realm-impl is also required. I'm currently failing on the build with a

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-remote-resources-plugin:1.5:process (default) on project fortress-realm-impl: Execution default of goal org.apache.maven.plugins:maven-remote-resources-plugin:1.5:process failed: For artifact {null:null:null:jar}: The groupId cannot be empty. -> [Help 1] [ERROR]

I'll poke around and see if I can figure out what's going on.

shawnmckinney commented 9 years ago

You're right on the realm dependency. Here's how to build that:

git clone https://git-wip-us.apache.org/repos/asf/directory-fortress-realm.git cd directory-fortress-realm/ $M2_HOME/bin/mvn install -DskipTests

finally after that the apache fortress demo's javadoc should build. I've got a clean vm (redhat) and testing it now. I'll update the corresponding doc as well go.

On Tue, Feb 3, 2015 at 10:55 AM, Shawn Eion Smith notifications@github.com wrote:

We're getting closer. The fortress-realm-impl is also required. I'm currently failing on the build with a

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-remote-resources-plugin:1.5:process (default) on project fortress-realm-impl: Execution default of goal org.apache.maven.plugins:maven-remote-resources-plugin:1.5:process failed: For artifact {null:null:null:jar}: The groupId cannot be empty. -> [Help 1] [ERROR]

I'll poke around and see if I can figure out what's going on.

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1#issuecomment-72687953 .

ussmith commented 9 years ago

I did pull realm down, but I'm geting the maven-remote-resource-plugin error listed above. I'm digging around now. Nothing obvious in the effective pom. I'm wondering if it's a transitive dependency problem but the error messages are too useful.

shawnmckinney commented 9 years ago

That is strange. I just tried on a clean vm so it should work for you too. I said 'should' ;-) Shot in dark; could be a maven 'problem' - are you using 3?

On Tue, Feb 3, 2015 at 11:36 AM, Shawn Eion Smith notifications@github.com wrote:

I did pull realm down, but I'm geting the maven-remote-resource-plugin error listed above. I'm digging around now. Nothing obvious in the effective pom. I'm wondering if it's a transitive dependency problem but the error messages are too useful.

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1#issuecomment-72696283 .

ussmith commented 9 years ago

Yup, Maven 3.0.5. There's nothing simple like when eclips helps you by putting an empty dependency in. If I execute in full debug the last artifact I see it pull is

Using mirror ci (https://ci.psu.edu/nexus/content/groups/public) for apache.snapshots (https://repository.apache.org/content/repositories/snapshots/). [DEBUG] org.apache.directory.jdbm:apacheds-jdbm1:jar:2.0.0-M3:compile (selected for compile)

Though I don't know if that has anything to do with it. I'll keep poking at it.

shawnmckinney commented 9 years ago

Which pom.xml are you executing? Should be the one in the root folder. Not the ones under proxy or impl folders.

On Tue, Feb 3, 2015 at 11:52 AM, Shawn Eion Smith notifications@github.com wrote:

Yup, Maven 3.0.5. There's nothing simple like when eclips helps you by putting an empty dependency in. If I execute in full debug the last artifact I see it pull is

Using mirror ci (https://ci.psu.edu/nexus/content/groups/public https://ci.psu.edu/nexus/content/groups/public) for apache.snapshots (https://repository.apache.org/content/repositories/snapshots/ https://repository.apache.org/content/repositories/snapshots/). [DEBUG] org.apache.directory.jdbm:apacheds-jdbm1:jar:2.0.0-M3:compile (selected for compile)

Though I don't know if that has anything to do with it. I'll keep poking at it.

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1#issuecomment-72699485 .

shawnmckinney commented 9 years ago

Another shot in dark...

Are you executing pom from inside eclipse? Wonder if somehow, because this is a nested project pom, it creates problems with the ide integration. Wouldn't expect that, but I don't use eclipse very often and have not tested this project with it.

Might be worth a try to execute maven from command line?

ussmith commented 9 years ago

Yup, I'm at the root on all projects. I just cleared all of the Apache Directory stuff from my .m2 directory and am going to try to start with a clean slate.

All my maven commands are being done command line, but you're right, eclips handles the nesting fine.

ussmith commented 9 years ago

Another point of reference, I moved to my mac (against my will) and got a clean build. My Ubuntu 14.04 box is having a problem the mac's not seeing.

shawnmckinney commented 9 years ago

OK that is good info. I have an ubuntu 14 vm, let me give that one a spin...

On Tue, Feb 3, 2015 at 12:47 PM, Shawn Eion Smith notifications@github.com wrote:

Another point of reference, I moved to my mac (against my will) and got a clean build. My Ubuntu 14.04 box is having a problem the mac's not seeing.

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1#issuecomment-72709635 .

ussmith commented 9 years ago

I'm also going to update maven to the latest on my Ubuntu box and completely wipe my .m2/resources directory (I only did Apache last time)

ussmith commented 9 years ago

Completely wiping my .m2/resources seems to have gotten it. I have no idea what dependency got corrupted. On to the next step...

shawnmckinney commented 9 years ago

There might be a rough patch getting apache ds hooked up. I'm going to keep updating doc as you go...

On Tue, Feb 3, 2015 at 12:55 PM, Shawn Eion Smith notifications@github.com wrote:

Completely wiping my .m2/resources seems to have gotten it. I have no idea what dependency got corrupted. On to the next step...

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1#issuecomment-72710930 .

ussmith commented 9 years ago

Under Create new SSL Keys, in step 4 & 5 I'd recommend adding some wording describing the import and export passwords.

ussmith commented 9 years ago

Also, in step 6 you set JAVA_HOME to get a path to keytool, but you'd already used it in step 5 without the environment variable being set. Personally, I'd suggest taking the JAVA_HOME export out entirely, I can't think of any packaging tools that don't install the java toolkit somewhere in the classpath by default.

ussmith commented 9 years ago

When attempting to download the Apache DS 64 bit debian installer

Not Found The requested URL /apacheds/dist/2.0.0-M19/apacheds-2.0.0-M19-amd64.deb was not found on this server.

shawnmckinney commented 9 years ago

testing now...

On Wed, Feb 4, 2015 at 8:52 AM, Shawn Eion Smith notifications@github.com wrote:

When attempting to download the Apache DS 64 bit debian installer

Not Found The requested URL /apacheds/dist/2.0.0-M19/apacheds-2.0.0-M19-amd64.deb was not found on this server.

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1#issuecomment-72867264 .

ussmith commented 9 years ago

I used the binary installer and it seemed to work fine.

ussmith commented 9 years ago

Another observation, Step V is set up to install fortress-core, which is step one in the new README instructions. Step one in the README doesn't describe the changes to fortress.properties or refreshLDAPData.xml. Might be useful to Change Step 5 to reference the mvn way of pulling and building the project too.

ussmith commented 9 years ago

Meaning don't pull the tar.gz, do a clone instead. Sorry, wasn't clear there.

shawnmckinney commented 9 years ago

agreed. did you get past the apacheds and studio installation?

On Wed, Feb 4, 2015 at 9:31 AM, Shawn Eion Smith notifications@github.com wrote:

Another observation, Step V is set up to install fortress-core, which is step one in the new README instructions. Step one in the README doesn't describe the changes to fortress.properties or refreshLDAPData.xml. Might be useful to Change Step 5 to reference the mvn way of pulling and building the project too.

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1#issuecomment-72875302 .

ussmith commented 9 years ago

I did by using the binary installer, the .deb location was the 404.

ussmith commented 9 years ago

A couple more things. 1) There's nowhere that tells you that you that you have to run sudo service apacheds..ver start 2) I've attached some images that might help folks navigate through setting up the Directory Studio Connection 3) I'm not sure what level you want me to import the ldif at. I'm assuming either the Root or dc=example,dc=com, but it's not clearly spelled out. newldapconnection newldapconnection2 newldapconnection3

shawnmckinney commented 9 years ago

I imported the schema into ou=schema. Agree it needs to be spelled out better including how to start, stop, connect with studio and import the schema.

On Wed, Feb 4, 2015 at 11:35 AM, Shawn Eion Smith notifications@github.com wrote:

A couple more things. 1) There's nowhere that tells you that you that you have to run sudo service apacheds..ver start 2) I've attached some images that might help folks navigate through setting up the Directory Studio Connection 3) I'm not sure what level you want me to import the ldif at. I'm assuming either the Root or dc=example,dc=com, but it's not clearly spelled out. [image: newldapconnection] https://cloud.githubusercontent.com/assets/3867553/6045702/440cab98-ac6a-11e4-8f87-765d948d9fb1.png [image: newldapconnection2] https://cloud.githubusercontent.com/assets/3867553/6045701/440bb7ce-ac6a-11e4-9b77-9a1524c233e0.png [image: newldapconnection3] https://cloud.githubusercontent.com/assets/3867553/6045703/44472ec6-ac6a-11e4-8ed8-8f9f72958b7b.png

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1#issuecomment-72900024 .

ussmith commented 9 years ago

Some more pictures for the ldif import ldifimport ldifimport2 ldifimport3 ldifimport4

shawnmckinney commented 9 years ago

understood

On Wed, Feb 4, 2015 at 9:32 AM, Shawn Eion Smith notifications@github.com wrote:

Meaning don't pull the tar.gz, do a clone instead. Sorry, wasn't clear there.

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1#issuecomment-72875478 .

shawnmckinney commented 9 years ago

Cool. My plan is to split the doc in two:

  1. fortress ten minute guide - will have the instructions to install the core, realm, web and rest components along with apache tomcat, directory and studio. This is mostly done and already includes your screenshots. There is a new README that describes the setup:

https://git-wip-us.apache.org/repos/asf?p=directory-fortress-core.git;a=blob;f=README-TEN-MINUTE-GUIDE.txt;h=1b31827af23e590c5c47a2e7f68217cda27be835;hb=2075c28f4e9871c87830d424195573ced67441bf

  1. apache fortress demo - will have the instructions to setup the keys, install mysql and setup the demo app.

Once I get #1 finished, I'll fix #2.

Thanks for the help and let me know if you have any other questions.

Shawn

On Wed, Feb 4, 2015 at 11:48 AM, Shawn Eion Smith notifications@github.com wrote:

Some more pictures for the ldif import [image: ldifimport] https://cloud.githubusercontent.com/assets/3867553/6045971/20a37be4-ac6c-11e4-934f-471623a9000a.png [image: ldifimport2] https://cloud.githubusercontent.com/assets/3867553/6045974/20a5ba1c-ac6c-11e4-9bd4-5cf641722548.png [image: ldifimport3] https://cloud.githubusercontent.com/assets/3867553/6045972/20a4d8ea-ac6c-11e4-98f4-e0511addaca2.png [image: ldifimport4] https://cloud.githubusercontent.com/assets/3867553/6045973/20a4eaba-ac6c-11e4-916d-60c69f6968e2.png

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1#issuecomment-72902585 .

ussmith commented 9 years ago

I'm going to have to expose my ignorance here a bit. I'm not an LDAP admin, so I'm not sure what the instruction: Setup partition in ApacheDS server matching ldap server params in config/fortress.properties file. is asking me to do.

shawnmckinney commented 9 years ago

It's confusing nomenclature for sure. I am in the process of cleaning this up - specifically the directory server and studio aspects. Based on the screen shots you have sent already you should be good here already and so disregard.

On Fri, Feb 6, 2015 at 2:49 PM, Shawn Eion Smith notifications@github.com wrote:

I'm going to have to expose my ignorance here a bit. I'm not an LDAP admin, so I'm not sure what the instruction: Setup partition in ApacheDS server matching ldap server params in config/fortress.properties file. is asking me to do.

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1#issuecomment-73309694 .

ussmith commented 9 years ago

I'm going through step 11 and 12 of the Install fortress core page and getting

unable to bind connection: Cannot connect on the server: Connection refused

At every step. Also Ldap connection refused exceptions and

addPermOps name [dsdSets] objName [org.apache.directory.fortress.core.rbac.ReviewMgrImpl] caught SecurityException=org.apache.directory.fortress.core.CreateException: createOperation objName [org.apache.directory.fortress.core.rbac.ReviewMgrImpl] opName [dsdSets] caught LdapException=Cannot connect on the server: Connection refused

messages all over the place. Is there a step that sets up user auth that I'm missing?

shawnmckinney commented 9 years ago

sounds like the ldap connection params in fortress.properties are not correct. Can you send the contents of that file?

On Mon, Feb 9, 2015 at 9:22 AM, Shawn Eion Smith notifications@github.com wrote:

I'm going through step 11 and 12 of the Install fortress core page and getting

unable to bind connection: Cannot connect on the server: Connection refused

At every step. Also Ldap connection refused exceptions and

addPermOps name [dsdSets] objName [org.apache.directory.fortress.core.rbac.ReviewMgrImpl] caught SecurityException=org.apache.directory.fortress.core.CreateException: createOperation objName [org.apache.directory.fortress.core.rbac.ReviewMgrImpl] opName [dsdSets] caught LdapException=Cannot connect on the server: Connection refused

messages all over the place. Is there a step that sets up user auth that I'm missing?

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1#issuecomment-73526221 .

ussmith commented 9 years ago

Actually, ignore my last, I'm going to try a few things

ussmith commented 9 years ago

apacheds had died but left a pid in the pid file so service activeds status thought it was alive. All's good now.

ussmith commented 9 years ago

Tests run: 83, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 296.562 sec <<< FAILURE! - in org.apache.directory.fortress.core.rbac.FortressJUnitTest testCreateSession(org.apache.directory.fortress.core.rbac.AccessMgrImplTest) Time elapsed: 0.065 sec <<< FAILURE! junit.framework.AssertionFailedError: org.apache.directory.fortress.core.rbac.AccessMgrImplTest.createSessions failed negative test at junit.framework.Assert.fail(Assert.java:57) at junit.framework.TestCase.fail(TestCase.java:227) at org.apache.directory.fortress.core.rbac.AccessMgrImplTest.createSessions(AccessMgrImplTest.java:382) at org.apache.directory.fortress.core.rbac.AccessMgrImplTest.testCreateSession(AccessMgrImplTest.java:340)

Results :

Failed tests: AccessMgrImplTest.testCreateSession:340->createSessions:382 org.apache.directory.fortress.core.rbac.AccessMgrImplTest.createSessions failed negative test

Tests run: 83, Failures: 1, Errors: 0, Skipped: 0

ussmith commented 9 years ago

Ran the same test directly in eclipse and it succeeded, don't know exactly why it died in mvn.

ussmith commented 9 years ago

By the way, I was looking at your test setup and I think you may get some good run from JUnitParams. It lets you do things like

@Test @Parameters({"17, false", "22, true" })

To set up a series of test cases with different parameters. You can also do things like

@Parameters(method = "getInputs")

On you're test methods where getInputs is a method that return the series of arguments that you want to test

I can set a couple up for you if you want to see how they work.

shawnmckinney commented 9 years ago

Good catch, created new issue to track:

https://issues.apache.org/jira/browse/FC-57

On Mon, Feb 9, 2015 at 10:36 AM, Shawn Eion Smith notifications@github.com wrote:

By the way, I was looking at your test setup and I think you may get some good run from JUnitParams. It lets you do things like

@Test https://github.com/Test @Parameters https://github.com/Parameters({"17, false", "22, true" })

To set up a series of test cases with different parameters. You can also do things like

@Parameters https://github.com/Parameters(method = "getInputs")

On you're test methods where getInputs is a method that return the series of arguments that you want to test

I can set a couple up for you if you want to see how they work.

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1#issuecomment-73540673 .

shawnmckinney commented 9 years ago

Interesting. Yes I'd like to see how that can work here.

On Mon, Feb 9, 2015 at 10:36 AM, Shawn Eion Smith notifications@github.com wrote:

By the way, I was looking at your test setup and I think you may get some good run from JUnitParams. It lets you do things like

@Test https://github.com/Test @Parameters https://github.com/Parameters({"17, false", "22, true" })

To set up a series of test cases with different parameters. You can also do things like

@Parameters https://github.com/Parameters(method = "getInputs")

On you're test methods where getInputs is a method that return the series of arguments that you want to test

I can set a couple up for you if you want to see how they work.

— Reply to this email directly or view it on GitHub https://github.com/shawnmckinney/apache-fortress-demo/issues/1#issuecomment-73540673 .