You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by spruitt <st...@hp.com> on 2016/01/14 17:45:55 UTC

basic security tag in bootstrap.xml

Can someone post an example of for the <basic-security> tab in the
bootstrap.xml file.

I left the <jaas-security domain="activemq"/> tag in the file and added
this:

<basic-security>
   <users>file:${activemq.home}/etc/artemis-users.properties</users>
   <roles>file:${activemq.home}/etc/artemis-roles.properties</roles>
   <default-user>guest</default-user>
</basic-security>

Now Artemis broker throws a SAX parse exception
Invalid content was found starting with element 'basic-security'. One of
'{"http://activemq.org/schema":server}' is expected.





--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by Clebert Suconic <cl...@gmail.com>.
there are a set of examples with the artemis download.

the one under examples/features/standard/security doesn't suit what
you're looking for?

On Thu, Jan 14, 2016 at 11:45 AM, spruitt <st...@hp.com> wrote:
> Can someone post an example of for the <basic-security> tab in the
> bootstrap.xml file.
>
> I left the <jaas-security domain="activemq"/> tag in the file and added
> this:
>
> <basic-security>
>    <users>file:${activemq.home}/etc/artemis-users.properties</users>
>    <roles>file:${activemq.home}/etc/artemis-roles.properties</roles>
>    <default-user>guest</default-user>
> </basic-security>
>
> Now Artemis broker throws a SAX parse exception
> Invalid content was found starting with element 'basic-security'. One of
> '{"http://activemq.org/schema":server}' is expected.
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
Clebert Suconic

Re: basic security tag in bootstrap.xml

Posted by Justin Bertram <jb...@apache.com>.
I guess I'm confused about your previous statements:

>  Clebert suggested I look under examples/features/standard/security.  I did,
>  but the example is for ActiveMQ, so I didn't pursue it.  Another suggestion,
>  is update the example folders with pure Artemis examples.

The example in examples/features/standard/security is for Artemis.  To be clear, Artemis is an ActiveMQ broker so there may be some confusion here over wording.  Moreover, I don't know of any example shipped with Artemis that isn't for Artemis in one way or another.

Regarding your actual problem...The broker.xml and the user/role properties files used by the example are only part of what you need.  Do you also have a properly configured bootstrap.xml and login.config?  If you run the example (using 'mvn clean verify') you should see those files in the target/server0/etc directory where the example executes.  The security documentation [1] discusses both of these in the "JAAS Security Manager" section.


Justin

[1] http://activemq.apache.org/artemis/docs/1.2.0/security.html

----- Original Message -----
From: "spruitt" <st...@hp.com>
To: users@activemq.apache.org
Sent: Friday, January 15, 2016 10:33:26 AM
Subject: Re: basic security tag in bootstrap.xml

I tried the security example at \examples\features\standard\security as
suggested by Clebert. I copied the the broker.xml and the user / role
property files to my broker install.  I ran the example code and I still get
the same problem.

Exception in thread "main" javax.jms.JMSSecurityException: AMQ119031: Unable
to validate user

I fail at:

// Step 6. bill makes a good connection.
billConnection = createConnection("bill", "activemq", cf);
billConnection.start();

There is something fundamentally wrong with how I am going about this. 
Perhaps there is something basic you think I know about, but I don't.    But
with a vanilla broker setup and simple example, I don't see why I am getting
this problem.

Thanks in advance.



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706045.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by spruitt <st...@hp.com>.
I tried the security example at \examples\features\standard\security as
suggested by Clebert. I copied the the broker.xml and the user / role
property files to my broker install.  I ran the example code and I still get
the same problem.

Exception in thread "main" javax.jms.JMSSecurityException: AMQ119031: Unable
to validate user

I fail at:

// Step 6. bill makes a good connection.
billConnection = createConnection("bill", "activemq", cf);
billConnection.start();

There is something fundamentally wrong with how I am going about this. 
Perhaps there is something basic you think I know about, but I don't.    But
with a vanilla broker setup and simple example, I don't see why I am getting
this problem.

Thanks in advance.



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706045.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by Justin Bertram <jb...@apache.com>.
BTW, you're correct about the <entry> element. It's no longer supported. We removed it when we implemented client-side JNDI. Server-side JNDI binding configuration is no longer necessary for the standalone broker.

I'll update that doc.  Thanks for the heads-up.


Justin

----- Original Message -----
From: "spruitt" <st...@hp.com>
To: users@activemq.apache.org
Sent: Wednesday, January 20, 2016 8:58:01 AM
Subject: RE: basic security tag in bootstrap.xml

Let's try again.  I may messed up and forgot the attachment or it may have been stripped?

I also think I found another documentation error.

At https://activemq.apache.org/artemis/docs/1.2.0/queue-attributes.html

This is shown as an example queue entry defined under the jms tag.  I think <entry> is illegal.  I get a SAX exception and it looks like a schema problem.

<queue name="selectorQueue">
   <entry name="/queue/selectorQueue"/>
   <selector string="color='red'"/>
   <durable>true</durable>
</queue>

From: Justin Bertram-2 [via ActiveMQ] [mailto:ml-node+s2283324n4706217h31@n4.nabble.com]
Sent: Wednesday, January 20, 2016 9:45 AM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

When you say, "The zip is the contents of my C:\\Servers\artemis-1.2.0 directory." To what "zip" are you referring?  I don't see a link to any zip file.

Maybe the best thing to do would be to forget about the example for now and just concentrate on the specific problem you're having with your particular set up.  Could you provide me with a test-case to reproduce what you're seeing there?


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706217&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706217&i=1>
Sent: Tuesday, January 19, 2016 2:17:44 PM
Subject: RE: basic security tag in bootstrap.xml

I am totally miffed too.  I have installed and configured many frameworks in the past, I can't recall having this much trouble.  It has to be something so basic it is right of front of my nose.

>From the beginning.

I downloaded the 1.2 zip from Apache.  I unzipped it into my C:\\lib folder.  I cd to C:\\lib\apache-artemis-1.2.0\bin.

>From there I followed the readme.html.

I ran ./artemis create with C:\\Servers\artemis-1.2.0 as directory
I provided admin as default user, xxx as default password, and I answered yes to anonymous access.

Under the Running the Server section of the user doc, I followed the instructions for installing as a service.  It starts and stops fine.

The zip is the contents of my C:\\Servers\artemis-1.2.0 directory.  Even though ARTEMIS_HOME points to C:\\lib\apache-artemis-1.2.0 this should be the same for everyone.

The etc/example folder contains the etc content from the security example
The etc/original folder contains the etc content from my install.

Not sure what else might be useful.



From: Justin Bertram-2 [via ActiveMQ] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4706217&i=2>]
Sent: Tuesday, January 19, 2016 2:49 PM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

Can you provide a set of steps or something that I can use to reproduce what you're seeing?  I'm not real sure how to help beyond that.  Based on what you're saying I would expect it to work but there's obviously some other factor involved.  At the very least could you zip you configuration up and provide it to me?

This should really be pretty straight-forward.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=1>
Sent: Tuesday, January 19, 2016 12:49:31 PM
Subject: RE: basic security tag in bootstrap.xml

Ok, I have something really wrong with my setup.  I copied all the server0/etc files to my installed broker.  Started the broker and then executed mvn -PnoServer verify and got this.

Default user cannot get a connection. Details: AMQ119031: Unable to validate user
User bill failed to connect. Details: AMQ119031: Unable to validate user
[ERROR]
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.activemq.artemis.maven.ArtemisClientPlugin.doExecute(ArtemisClientPlugin.java:61)
        at org.apache.activemq.artemis.maven.ArtemisAbstractPlugin.execute(ArtemisAbstractPlugin.java:75)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
:

This runs ok:   mvn verify

I copy the server0/etc folder to my installed broker and run mvn -PnoServer verify, start the broker service, and I get unable to validate user???



From: Justin Bertram-2 [via ActiveMQ] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=2>]
Sent: Tuesday, January 19, 2016 12:30 PM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

Looking at your etc.zip...

Your bootstrap.xml looks fine.  The jaas-security domain is "activemq" (which is defined in login.config).

Your login.config looks fine.  It's using the default configuration.

However, your artemis-users.properties and artemis-roles.properties don't contain the users/roles that the example expects to be there.  That's why you get an authentication failure for the user "bill" when you run the example against your broker (e.g. using 'mvn -PnoServer verify').

Also, your broker.xml doesn't have the security-setting configuration that the example expects so even if you added the right users and roles to the properties files you'd still get failures when running the example against your broker.

You can take a look at each of these files from the example (i.e. artemis-users.properties, artemis-roles.properties, and broker.xml) to see what you need to change in your configuration to run the example successfully against your broker.

Just to be clear, the output you shared console2.txt is what I would expect from .  It looks to me like everything is working properly given the circumstances.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=1>
Sent: Tuesday, January 19, 2016 9:38:57 AM
Subject: Re: basic security tag in bootstrap.xml

yeah. i messed up.  Here is the console when not starting broker manually.

Also, here are the config files I have been working with on my broker.

Hope this makes sense. console2.txt
<http://activemq.2283324.n4.nabble.com/file/n4706166/console2.txt>   etc.zip
<http://activemq.2283324.n4.nabble.com/file/n4706166/etc.zip>



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706166.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706170.html
To unsubscribe from basic security tag in bootstrap.xml, click here<
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706184.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706186.html
To unsubscribe from basic security tag in bootstrap.xml, click here<
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


installed-artemis.zip (3M) <http://activemq.2283324.n4.nabble.com/attachment/4706187/0/installed-artemis.zip>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706187.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706217.html
To unsubscribe from basic security tag in bootstrap.xml, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4705994&code=c3RldmUucHJ1aXR0QGhwLmNvbXw0NzA1OTk0fDU0MzU1MTgyNg==>.
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


installed-artemis.zip (3M) <http://activemq.2283324.n4.nabble.com/attachment/4706221/0/installed-artemis.zip>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706221.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

RE: basic security tag in bootstrap.xml

Posted by spruitt <st...@hp.com>.
The missing <argument> tag appears to be the problem.  I re-enabled security in broker.xml and I was able to establish a session, send and receive a message.  Gosh, how can I ever repay you.

From: Justin Bertram-2 [via ActiveMQ] [mailto:ml-node+s2283324n4706239h13@n4.nabble.com]
Sent: Wednesday, January 20, 2016 1:41 PM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

I wonder if the issue is with the <argument> elements configured in the artemis-service.xml.  I see that it's lacking any reference to the login config.  Try adding something like this:

   <argument>-Djava.security.auth.login.config="C:\path\to\login.config"</argument>

Alternatively, you could try using the traditional Windows script to start the server and see if you get any different result. The traditional script sources the artemis.cmd.profile which defines the java.security.auth.login.config system property.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706239&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706239&i=1>
Sent: Wednesday, January 20, 2016 8:58:01 AM
Subject: RE: basic security tag in bootstrap.xml

Let's try again.  I may messed up and forgot the attachment or it may have been stripped?

I also think I found another documentation error.

At https://activemq.apache.org/artemis/docs/1.2.0/queue-attributes.html

This is shown as an example queue entry defined under the jms tag.  I think <entry> is illegal.  I get a SAX exception and it looks like a schema problem.

<queue name="selectorQueue">
   <entry name="/queue/selectorQueue"/>
   <selector string="color='red'"/>
   <durable>true</durable>
</queue>

From: Justin Bertram-2 [via ActiveMQ] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4706239&i=2>]
Sent: Wednesday, January 20, 2016 9:45 AM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

When you say, "The zip is the contents of my C:\\Servers\artemis-1.2.0 directory." To what "zip" are you referring?  I don't see a link to any zip file.

Maybe the best thing to do would be to forget about the example for now and just concentrate on the specific problem you're having with your particular set up.  Could you provide me with a test-case to reproduce what you're seeing there?


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706217&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706217&i=1>
Sent: Tuesday, January 19, 2016 2:17:44 PM
Subject: RE: basic security tag in bootstrap.xml

I am totally miffed too.  I have installed and configured many frameworks in the past, I can't recall having this much trouble.  It has to be something so basic it is right of front of my nose.

>From the beginning.

I downloaded the 1.2 zip from Apache.  I unzipped it into my C:\\lib folder.  I cd to C:\\lib\apache-artemis-1.2.0\bin.

>From there I followed the readme.html.

I ran ./artemis create with C:\\Servers\artemis-1.2.0 as directory
I provided admin as default user, xxx as default password, and I answered yes to anonymous access.

Under the Running the Server section of the user doc, I followed the instructions for installing as a service.  It starts and stops fine.

The zip is the contents of my C:\\Servers\artemis-1.2.0 directory.  Even though ARTEMIS_HOME points to C:\\lib\apache-artemis-1.2.0 this should be the same for everyone.

The etc/example folder contains the etc content from the security example
The etc/original folder contains the etc content from my install.

Not sure what else might be useful.



From: Justin Bertram-2 [via ActiveMQ] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4706217&i=2>]
Sent: Tuesday, January 19, 2016 2:49 PM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

Can you provide a set of steps or something that I can use to reproduce what you're seeing?  I'm not real sure how to help beyond that.  Based on what you're saying I would expect it to work but there's obviously some other factor involved.  At the very least could you zip you configuration up and provide it to me?

This should really be pretty straight-forward.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=1>
Sent: Tuesday, January 19, 2016 12:49:31 PM
Subject: RE: basic security tag in bootstrap.xml

Ok, I have something really wrong with my setup.  I copied all the server0/etc files to my installed broker.  Started the broker and then executed mvn -PnoServer verify and got this.

Default user cannot get a connection. Details: AMQ119031: Unable to validate user
User bill failed to connect. Details: AMQ119031: Unable to validate user
[ERROR]
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.activemq.artemis.maven.ArtemisClientPlugin.doExecute(ArtemisClientPlugin.java:61)
        at org.apache.activemq.artemis.maven.ArtemisAbstractPlugin.execute(ArtemisAbstractPlugin.java:75)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
:

This runs ok:   mvn verify

I copy the server0/etc folder to my installed broker and run mvn -PnoServer verify, start the broker service, and I get unable to validate user???



From: Justin Bertram-2 [via ActiveMQ] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=2>]
Sent: Tuesday, January 19, 2016 12:30 PM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

Looking at your etc.zip...

Your bootstrap.xml looks fine.  The jaas-security domain is "activemq" (which is defined in login.config).

Your login.config looks fine.  It's using the default configuration.

However, your artemis-users.properties and artemis-roles.properties don't contain the users/roles that the example expects to be there.  That's why you get an authentication failure for the user "bill" when you run the example against your broker (e.g. using 'mvn -PnoServer verify').

Also, your broker.xml doesn't have the security-setting configuration that the example expects so even if you added the right users and roles to the properties files you'd still get failures when running the example against your broker.

You can take a look at each of these files from the example (i.e. artemis-users.properties, artemis-roles.properties, and broker.xml) to see what you need to change in your configuration to run the example successfully against your broker.

Just to be clear, the output you shared console2.txt is what I would expect from .  It looks to me like everything is working properly given the circumstances.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=1>
Sent: Tuesday, January 19, 2016 9:38:57 AM
Subject: Re: basic security tag in bootstrap.xml

yeah. i messed up.  Here is the console when not starting broker manually.

Also, here are the config files I have been working with on my broker.

Hope this makes sense. console2.txt
<http://activemq.2283324.n4.nabble.com/file/n4706166/console2.txt>   etc.zip
<http://activemq.2283324.n4.nabble.com/file/n4706166/etc.zip>



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706166.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706170.html
To unsubscribe from basic security tag in bootstrap.xml, click here<
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706184.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706186.html
To unsubscribe from basic security tag in bootstrap.xml, click here<
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


installed-artemis.zip (3M) <http://activemq.2283324.n4.nabble.com/attachment/4706187/0/installed-artemis.zip>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706187.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706217.html
To unsubscribe from basic security tag in bootstrap.xml, click here<
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


installed-artemis.zip (3M) <http://activemq.2283324.n4.nabble.com/attachment/4706221/0/installed-artemis.zip>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706221.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706239.html
To unsubscribe from basic security tag in bootstrap.xml, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4705994&code=c3RldmUucHJ1aXR0QGhwLmNvbXw0NzA1OTk0fDU0MzU1MTgyNg==>.
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706244.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by Justin Bertram <jb...@apache.com>.
I wonder if the issue is with the <argument> elements configured in the artemis-service.xml.  I see that it's lacking any reference to the login config.  Try adding something like this:

   <argument>-Djava.security.auth.login.config="C:\path\to\login.config"</argument>

Alternatively, you could try using the traditional Windows script to start the server and see if you get any different result. The traditional script sources the artemis.cmd.profile which defines the java.security.auth.login.config system property.


Justin

----- Original Message -----
From: "spruitt" <st...@hp.com>
To: users@activemq.apache.org
Sent: Wednesday, January 20, 2016 8:58:01 AM
Subject: RE: basic security tag in bootstrap.xml

Let's try again.  I may messed up and forgot the attachment or it may have been stripped?

I also think I found another documentation error.

At https://activemq.apache.org/artemis/docs/1.2.0/queue-attributes.html

This is shown as an example queue entry defined under the jms tag.  I think <entry> is illegal.  I get a SAX exception and it looks like a schema problem.

<queue name="selectorQueue">
   <entry name="/queue/selectorQueue"/>
   <selector string="color='red'"/>
   <durable>true</durable>
</queue>

From: Justin Bertram-2 [via ActiveMQ] [mailto:ml-node+s2283324n4706217h31@n4.nabble.com]
Sent: Wednesday, January 20, 2016 9:45 AM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

When you say, "The zip is the contents of my C:\\Servers\artemis-1.2.0 directory." To what "zip" are you referring?  I don't see a link to any zip file.

Maybe the best thing to do would be to forget about the example for now and just concentrate on the specific problem you're having with your particular set up.  Could you provide me with a test-case to reproduce what you're seeing there?


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706217&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706217&i=1>
Sent: Tuesday, January 19, 2016 2:17:44 PM
Subject: RE: basic security tag in bootstrap.xml

I am totally miffed too.  I have installed and configured many frameworks in the past, I can't recall having this much trouble.  It has to be something so basic it is right of front of my nose.

>From the beginning.

I downloaded the 1.2 zip from Apache.  I unzipped it into my C:\\lib folder.  I cd to C:\\lib\apache-artemis-1.2.0\bin.

>From there I followed the readme.html.

I ran ./artemis create with C:\\Servers\artemis-1.2.0 as directory
I provided admin as default user, xxx as default password, and I answered yes to anonymous access.

Under the Running the Server section of the user doc, I followed the instructions for installing as a service.  It starts and stops fine.

The zip is the contents of my C:\\Servers\artemis-1.2.0 directory.  Even though ARTEMIS_HOME points to C:\\lib\apache-artemis-1.2.0 this should be the same for everyone.

The etc/example folder contains the etc content from the security example
The etc/original folder contains the etc content from my install.

Not sure what else might be useful.



From: Justin Bertram-2 [via ActiveMQ] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4706217&i=2>]
Sent: Tuesday, January 19, 2016 2:49 PM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

Can you provide a set of steps or something that I can use to reproduce what you're seeing?  I'm not real sure how to help beyond that.  Based on what you're saying I would expect it to work but there's obviously some other factor involved.  At the very least could you zip you configuration up and provide it to me?

This should really be pretty straight-forward.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=1>
Sent: Tuesday, January 19, 2016 12:49:31 PM
Subject: RE: basic security tag in bootstrap.xml

Ok, I have something really wrong with my setup.  I copied all the server0/etc files to my installed broker.  Started the broker and then executed mvn -PnoServer verify and got this.

Default user cannot get a connection. Details: AMQ119031: Unable to validate user
User bill failed to connect. Details: AMQ119031: Unable to validate user
[ERROR]
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.activemq.artemis.maven.ArtemisClientPlugin.doExecute(ArtemisClientPlugin.java:61)
        at org.apache.activemq.artemis.maven.ArtemisAbstractPlugin.execute(ArtemisAbstractPlugin.java:75)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
:

This runs ok:   mvn verify

I copy the server0/etc folder to my installed broker and run mvn -PnoServer verify, start the broker service, and I get unable to validate user???



From: Justin Bertram-2 [via ActiveMQ] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=2>]
Sent: Tuesday, January 19, 2016 12:30 PM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

Looking at your etc.zip...

Your bootstrap.xml looks fine.  The jaas-security domain is "activemq" (which is defined in login.config).

Your login.config looks fine.  It's using the default configuration.

However, your artemis-users.properties and artemis-roles.properties don't contain the users/roles that the example expects to be there.  That's why you get an authentication failure for the user "bill" when you run the example against your broker (e.g. using 'mvn -PnoServer verify').

Also, your broker.xml doesn't have the security-setting configuration that the example expects so even if you added the right users and roles to the properties files you'd still get failures when running the example against your broker.

You can take a look at each of these files from the example (i.e. artemis-users.properties, artemis-roles.properties, and broker.xml) to see what you need to change in your configuration to run the example successfully against your broker.

Just to be clear, the output you shared console2.txt is what I would expect from .  It looks to me like everything is working properly given the circumstances.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=1>
Sent: Tuesday, January 19, 2016 9:38:57 AM
Subject: Re: basic security tag in bootstrap.xml

yeah. i messed up.  Here is the console when not starting broker manually.

Also, here are the config files I have been working with on my broker.

Hope this makes sense. console2.txt
<http://activemq.2283324.n4.nabble.com/file/n4706166/console2.txt>   etc.zip
<http://activemq.2283324.n4.nabble.com/file/n4706166/etc.zip>



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706166.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706170.html
To unsubscribe from basic security tag in bootstrap.xml, click here<
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706184.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706186.html
To unsubscribe from basic security tag in bootstrap.xml, click here<
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


installed-artemis.zip (3M) <http://activemq.2283324.n4.nabble.com/attachment/4706187/0/installed-artemis.zip>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706187.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706217.html
To unsubscribe from basic security tag in bootstrap.xml, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4705994&code=c3RldmUucHJ1aXR0QGhwLmNvbXw0NzA1OTk0fDU0MzU1MTgyNg==>.
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


installed-artemis.zip (3M) <http://activemq.2283324.n4.nabble.com/attachment/4706221/0/installed-artemis.zip>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706221.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by Robbie Gemmell <ro...@gmail.com>.
Its buried right at the bottom of the mail (inc previous replies):
http://activemq.2283324.n4.nabble.com/attachment/4706187/0/installed-artemis.zip

Easier to spot if you follow the link to the nabble thread.

On 20 January 2016 at 15:06, Justin Bertram <jb...@apache.com> wrote:
> When you say, "The zip is the contents of my C:\\Servers\artemis-1.2.0 directory." To what "zip" are you referring?  I don't see a link to any zip file.
>
> Maybe the best thing to do would be to forget about the example for now and just concentrate on the specific problem you're having with your particular set up.  Could you provide me with a test-case to reproduce what you're seeing there?
>
>
> Justin
>
> ----- Original Message -----
> From: "spruitt" <st...@hp.com>
> To: users@activemq.apache.org
> Sent: Tuesday, January 19, 2016 2:17:44 PM
> Subject: RE: basic security tag in bootstrap.xml
>
> I am totally miffed too.  I have installed and configured many frameworks in the past, I can't recall having this much trouble.  It has to be something so basic it is right of front of my nose.
>
> From the beginning.
>
> I downloaded the 1.2 zip from Apache.  I unzipped it into my C:\\lib folder.  I cd to C:\\lib\apache-artemis-1.2.0\bin.
>
> From there I followed the readme.html.
>
> I ran ./artemis create with C:\\Servers\artemis-1.2.0 as directory
> I provided admin as default user, xxx as default password, and I answered yes to anonymous access.
>
> Under the Running the Server section of the user doc, I followed the instructions for installing as a service.  It starts and stops fine.
>
> The zip is the contents of my C:\\Servers\artemis-1.2.0 directory.  Even though ARTEMIS_HOME points to C:\\lib\apache-artemis-1.2.0 this should be the same for everyone.
>
> The etc/example folder contains the etc content from the security example
> The etc/original folder contains the etc content from my install.
>
> Not sure what else might be useful.
>
>
>
> From: Justin Bertram-2 [via ActiveMQ] [mailto:ml-node+s2283324n4706186h70@n4.nabble.com]
> Sent: Tuesday, January 19, 2016 2:49 PM
> To: Pruitt, Byron S
> Subject: Re: basic security tag in bootstrap.xml
>
> Can you provide a set of steps or something that I can use to reproduce what you're seeing?  I'm not real sure how to help beyond that.  Based on what you're saying I would expect it to work but there's obviously some other factor involved.  At the very least could you zip you configuration up and provide it to me?
>
> This should really be pretty straight-forward.
>
>
> Justin
>
> ----- Original Message -----
> From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=0>>
> To: [hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=1>
> Sent: Tuesday, January 19, 2016 12:49:31 PM
> Subject: RE: basic security tag in bootstrap.xml
>
> Ok, I have something really wrong with my setup.  I copied all the server0/etc files to my installed broker.  Started the broker and then executed mvn -PnoServer verify and got this.
>
> Default user cannot get a connection. Details: AMQ119031: Unable to validate user
> User bill failed to connect. Details: AMQ119031: Unable to validate user
> [ERROR]
> java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:497)
>         at org.apache.activemq.artemis.maven.ArtemisClientPlugin.doExecute(ArtemisClientPlugin.java:61)
>         at org.apache.activemq.artemis.maven.ArtemisAbstractPlugin.execute(ArtemisAbstractPlugin.java:75)
>         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
> :
>
> This runs ok:   mvn verify
>
> I copy the server0/etc folder to my installed broker and run mvn -PnoServer verify, start the broker service, and I get unable to validate user???
>
>
>
> From: Justin Bertram-2 [via ActiveMQ] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=2>]
> Sent: Tuesday, January 19, 2016 12:30 PM
> To: Pruitt, Byron S
> Subject: Re: basic security tag in bootstrap.xml
>
> Looking at your etc.zip...
>
> Your bootstrap.xml looks fine.  The jaas-security domain is "activemq" (which is defined in login.config).
>
> Your login.config looks fine.  It's using the default configuration.
>
> However, your artemis-users.properties and artemis-roles.properties don't contain the users/roles that the example expects to be there.  That's why you get an authentication failure for the user "bill" when you run the example against your broker (e.g. using 'mvn -PnoServer verify').
>
> Also, your broker.xml doesn't have the security-setting configuration that the example expects so even if you added the right users and roles to the properties files you'd still get failures when running the example against your broker.
>
> You can take a look at each of these files from the example (i.e. artemis-users.properties, artemis-roles.properties, and broker.xml) to see what you need to change in your configuration to run the example successfully against your broker.
>
> Just to be clear, the output you shared console2.txt is what I would expect from .  It looks to me like everything is working properly given the circumstances.
>
>
> Justin
>
> ----- Original Message -----
> From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=0>>
> To: [hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=1>
> Sent: Tuesday, January 19, 2016 9:38:57 AM
> Subject: Re: basic security tag in bootstrap.xml
>
> yeah. i messed up.  Here is the console when not starting broker manually.
>
> Also, here are the config files I have been working with on my broker.
>
> Hope this makes sense. console2.txt
> <http://activemq.2283324.n4.nabble.com/file/n4706166/console2.txt>   etc.zip
> <http://activemq.2283324.n4.nabble.com/file/n4706166/etc.zip>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706166.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706170.html
> To unsubscribe from basic security tag in bootstrap.xml, click here<
> NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706184.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706186.html
> To unsubscribe from basic security tag in bootstrap.xml, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4705994&code=c3RldmUucHJ1aXR0QGhwLmNvbXw0NzA1OTk0fDU0MzU1MTgyNg==>.
> NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
> installed-artemis.zip (3M) <http://activemq.2283324.n4.nabble.com/attachment/4706187/0/installed-artemis.zip>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706187.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

RE: basic security tag in bootstrap.xml

Posted by spruitt <st...@hp.com>.
Let's try again.  I may messed up and forgot the attachment or it may have been stripped?

I also think I found another documentation error.

At https://activemq.apache.org/artemis/docs/1.2.0/queue-attributes.html

This is shown as an example queue entry defined under the jms tag.  I think <entry> is illegal.  I get a SAX exception and it looks like a schema problem.

<queue name="selectorQueue">
   <entry name="/queue/selectorQueue"/>
   <selector string="color='red'"/>
   <durable>true</durable>
</queue>

From: Justin Bertram-2 [via ActiveMQ] [mailto:ml-node+s2283324n4706217h31@n4.nabble.com]
Sent: Wednesday, January 20, 2016 9:45 AM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

When you say, "The zip is the contents of my C:\\Servers\artemis-1.2.0 directory." To what "zip" are you referring?  I don't see a link to any zip file.

Maybe the best thing to do would be to forget about the example for now and just concentrate on the specific problem you're having with your particular set up.  Could you provide me with a test-case to reproduce what you're seeing there?


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706217&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706217&i=1>
Sent: Tuesday, January 19, 2016 2:17:44 PM
Subject: RE: basic security tag in bootstrap.xml

I am totally miffed too.  I have installed and configured many frameworks in the past, I can't recall having this much trouble.  It has to be something so basic it is right of front of my nose.

>From the beginning.

I downloaded the 1.2 zip from Apache.  I unzipped it into my C:\\lib folder.  I cd to C:\\lib\apache-artemis-1.2.0\bin.

>From there I followed the readme.html.

I ran ./artemis create with C:\\Servers\artemis-1.2.0 as directory
I provided admin as default user, xxx as default password, and I answered yes to anonymous access.

Under the Running the Server section of the user doc, I followed the instructions for installing as a service.  It starts and stops fine.

The zip is the contents of my C:\\Servers\artemis-1.2.0 directory.  Even though ARTEMIS_HOME points to C:\\lib\apache-artemis-1.2.0 this should be the same for everyone.

The etc/example folder contains the etc content from the security example
The etc/original folder contains the etc content from my install.

Not sure what else might be useful.



From: Justin Bertram-2 [via ActiveMQ] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4706217&i=2>]
Sent: Tuesday, January 19, 2016 2:49 PM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

Can you provide a set of steps or something that I can use to reproduce what you're seeing?  I'm not real sure how to help beyond that.  Based on what you're saying I would expect it to work but there's obviously some other factor involved.  At the very least could you zip you configuration up and provide it to me?

This should really be pretty straight-forward.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=1>
Sent: Tuesday, January 19, 2016 12:49:31 PM
Subject: RE: basic security tag in bootstrap.xml

Ok, I have something really wrong with my setup.  I copied all the server0/etc files to my installed broker.  Started the broker and then executed mvn -PnoServer verify and got this.

Default user cannot get a connection. Details: AMQ119031: Unable to validate user
User bill failed to connect. Details: AMQ119031: Unable to validate user
[ERROR]
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.activemq.artemis.maven.ArtemisClientPlugin.doExecute(ArtemisClientPlugin.java:61)
        at org.apache.activemq.artemis.maven.ArtemisAbstractPlugin.execute(ArtemisAbstractPlugin.java:75)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
:

This runs ok:   mvn verify

I copy the server0/etc folder to my installed broker and run mvn -PnoServer verify, start the broker service, and I get unable to validate user???



From: Justin Bertram-2 [via ActiveMQ] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=2>]
Sent: Tuesday, January 19, 2016 12:30 PM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

Looking at your etc.zip...

Your bootstrap.xml looks fine.  The jaas-security domain is "activemq" (which is defined in login.config).

Your login.config looks fine.  It's using the default configuration.

However, your artemis-users.properties and artemis-roles.properties don't contain the users/roles that the example expects to be there.  That's why you get an authentication failure for the user "bill" when you run the example against your broker (e.g. using 'mvn -PnoServer verify').

Also, your broker.xml doesn't have the security-setting configuration that the example expects so even if you added the right users and roles to the properties files you'd still get failures when running the example against your broker.

You can take a look at each of these files from the example (i.e. artemis-users.properties, artemis-roles.properties, and broker.xml) to see what you need to change in your configuration to run the example successfully against your broker.

Just to be clear, the output you shared console2.txt is what I would expect from .  It looks to me like everything is working properly given the circumstances.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=1>
Sent: Tuesday, January 19, 2016 9:38:57 AM
Subject: Re: basic security tag in bootstrap.xml

yeah. i messed up.  Here is the console when not starting broker manually.

Also, here are the config files I have been working with on my broker.

Hope this makes sense. console2.txt
<http://activemq.2283324.n4.nabble.com/file/n4706166/console2.txt>   etc.zip
<http://activemq.2283324.n4.nabble.com/file/n4706166/etc.zip>



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706166.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706170.html
To unsubscribe from basic security tag in bootstrap.xml, click here<
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706184.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706186.html
To unsubscribe from basic security tag in bootstrap.xml, click here<
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


installed-artemis.zip (3M) <http://activemq.2283324.n4.nabble.com/attachment/4706187/0/installed-artemis.zip>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706187.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706217.html
To unsubscribe from basic security tag in bootstrap.xml, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4705994&code=c3RldmUucHJ1aXR0QGhwLmNvbXw0NzA1OTk0fDU0MzU1MTgyNg==>.
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


installed-artemis.zip (3M) <http://activemq.2283324.n4.nabble.com/attachment/4706221/0/installed-artemis.zip>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706221.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by Justin Bertram <jb...@apache.com>.
When you say, "The zip is the contents of my C:\\Servers\artemis-1.2.0 directory." To what "zip" are you referring?  I don't see a link to any zip file.

Maybe the best thing to do would be to forget about the example for now and just concentrate on the specific problem you're having with your particular set up.  Could you provide me with a test-case to reproduce what you're seeing there?


Justin

----- Original Message -----
From: "spruitt" <st...@hp.com>
To: users@activemq.apache.org
Sent: Tuesday, January 19, 2016 2:17:44 PM
Subject: RE: basic security tag in bootstrap.xml

I am totally miffed too.  I have installed and configured many frameworks in the past, I can't recall having this much trouble.  It has to be something so basic it is right of front of my nose.

>From the beginning.

I downloaded the 1.2 zip from Apache.  I unzipped it into my C:\\lib folder.  I cd to C:\\lib\apache-artemis-1.2.0\bin.

>From there I followed the readme.html.

I ran ./artemis create with C:\\Servers\artemis-1.2.0 as directory
I provided admin as default user, xxx as default password, and I answered yes to anonymous access.

Under the Running the Server section of the user doc, I followed the instructions for installing as a service.  It starts and stops fine.

The zip is the contents of my C:\\Servers\artemis-1.2.0 directory.  Even though ARTEMIS_HOME points to C:\\lib\apache-artemis-1.2.0 this should be the same for everyone.

The etc/example folder contains the etc content from the security example
The etc/original folder contains the etc content from my install.

Not sure what else might be useful.



From: Justin Bertram-2 [via ActiveMQ] [mailto:ml-node+s2283324n4706186h70@n4.nabble.com]
Sent: Tuesday, January 19, 2016 2:49 PM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

Can you provide a set of steps or something that I can use to reproduce what you're seeing?  I'm not real sure how to help beyond that.  Based on what you're saying I would expect it to work but there's obviously some other factor involved.  At the very least could you zip you configuration up and provide it to me?

This should really be pretty straight-forward.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=1>
Sent: Tuesday, January 19, 2016 12:49:31 PM
Subject: RE: basic security tag in bootstrap.xml

Ok, I have something really wrong with my setup.  I copied all the server0/etc files to my installed broker.  Started the broker and then executed mvn -PnoServer verify and got this.

Default user cannot get a connection. Details: AMQ119031: Unable to validate user
User bill failed to connect. Details: AMQ119031: Unable to validate user
[ERROR]
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.activemq.artemis.maven.ArtemisClientPlugin.doExecute(ArtemisClientPlugin.java:61)
        at org.apache.activemq.artemis.maven.ArtemisAbstractPlugin.execute(ArtemisAbstractPlugin.java:75)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
:

This runs ok:   mvn verify

I copy the server0/etc folder to my installed broker and run mvn -PnoServer verify, start the broker service, and I get unable to validate user???



From: Justin Bertram-2 [via ActiveMQ] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=2>]
Sent: Tuesday, January 19, 2016 12:30 PM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

Looking at your etc.zip...

Your bootstrap.xml looks fine.  The jaas-security domain is "activemq" (which is defined in login.config).

Your login.config looks fine.  It's using the default configuration.

However, your artemis-users.properties and artemis-roles.properties don't contain the users/roles that the example expects to be there.  That's why you get an authentication failure for the user "bill" when you run the example against your broker (e.g. using 'mvn -PnoServer verify').

Also, your broker.xml doesn't have the security-setting configuration that the example expects so even if you added the right users and roles to the properties files you'd still get failures when running the example against your broker.

You can take a look at each of these files from the example (i.e. artemis-users.properties, artemis-roles.properties, and broker.xml) to see what you need to change in your configuration to run the example successfully against your broker.

Just to be clear, the output you shared console2.txt is what I would expect from .  It looks to me like everything is working properly given the circumstances.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=1>
Sent: Tuesday, January 19, 2016 9:38:57 AM
Subject: Re: basic security tag in bootstrap.xml

yeah. i messed up.  Here is the console when not starting broker manually.

Also, here are the config files I have been working with on my broker.

Hope this makes sense. console2.txt
<http://activemq.2283324.n4.nabble.com/file/n4706166/console2.txt>   etc.zip
<http://activemq.2283324.n4.nabble.com/file/n4706166/etc.zip>



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706166.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706170.html
To unsubscribe from basic security tag in bootstrap.xml, click here<
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706184.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706186.html
To unsubscribe from basic security tag in bootstrap.xml, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4705994&code=c3RldmUucHJ1aXR0QGhwLmNvbXw0NzA1OTk0fDU0MzU1MTgyNg==>.
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


installed-artemis.zip (3M) <http://activemq.2283324.n4.nabble.com/attachment/4706187/0/installed-artemis.zip>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706187.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

RE: basic security tag in bootstrap.xml

Posted by spruitt <st...@hp.com>.
I am totally miffed too.  I have installed and configured many frameworks in the past, I can't recall having this much trouble.  It has to be something so basic it is right of front of my nose.

>From the beginning.

I downloaded the 1.2 zip from Apache.  I unzipped it into my C:\\lib folder.  I cd to C:\\lib\apache-artemis-1.2.0\bin.

>From there I followed the readme.html.

I ran ./artemis create with C:\\Servers\artemis-1.2.0 as directory
I provided admin as default user, xxx as default password, and I answered yes to anonymous access.

Under the Running the Server section of the user doc, I followed the instructions for installing as a service.  It starts and stops fine.

The zip is the contents of my C:\\Servers\artemis-1.2.0 directory.  Even though ARTEMIS_HOME points to C:\\lib\apache-artemis-1.2.0 this should be the same for everyone.

The etc/example folder contains the etc content from the security example
The etc/original folder contains the etc content from my install.

Not sure what else might be useful.



From: Justin Bertram-2 [via ActiveMQ] [mailto:ml-node+s2283324n4706186h70@n4.nabble.com]
Sent: Tuesday, January 19, 2016 2:49 PM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

Can you provide a set of steps or something that I can use to reproduce what you're seeing?  I'm not real sure how to help beyond that.  Based on what you're saying I would expect it to work but there's obviously some other factor involved.  At the very least could you zip you configuration up and provide it to me?

This should really be pretty straight-forward.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=1>
Sent: Tuesday, January 19, 2016 12:49:31 PM
Subject: RE: basic security tag in bootstrap.xml

Ok, I have something really wrong with my setup.  I copied all the server0/etc files to my installed broker.  Started the broker and then executed mvn -PnoServer verify and got this.

Default user cannot get a connection. Details: AMQ119031: Unable to validate user
User bill failed to connect. Details: AMQ119031: Unable to validate user
[ERROR]
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.activemq.artemis.maven.ArtemisClientPlugin.doExecute(ArtemisClientPlugin.java:61)
        at org.apache.activemq.artemis.maven.ArtemisAbstractPlugin.execute(ArtemisAbstractPlugin.java:75)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
:

This runs ok:   mvn verify

I copy the server0/etc folder to my installed broker and run mvn -PnoServer verify, start the broker service, and I get unable to validate user???



From: Justin Bertram-2 [via ActiveMQ] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4706186&i=2>]
Sent: Tuesday, January 19, 2016 12:30 PM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

Looking at your etc.zip...

Your bootstrap.xml looks fine.  The jaas-security domain is "activemq" (which is defined in login.config).

Your login.config looks fine.  It's using the default configuration.

However, your artemis-users.properties and artemis-roles.properties don't contain the users/roles that the example expects to be there.  That's why you get an authentication failure for the user "bill" when you run the example against your broker (e.g. using 'mvn -PnoServer verify').

Also, your broker.xml doesn't have the security-setting configuration that the example expects so even if you added the right users and roles to the properties files you'd still get failures when running the example against your broker.

You can take a look at each of these files from the example (i.e. artemis-users.properties, artemis-roles.properties, and broker.xml) to see what you need to change in your configuration to run the example successfully against your broker.

Just to be clear, the output you shared console2.txt is what I would expect from .  It looks to me like everything is working properly given the circumstances.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=1>
Sent: Tuesday, January 19, 2016 9:38:57 AM
Subject: Re: basic security tag in bootstrap.xml

yeah. i messed up.  Here is the console when not starting broker manually.

Also, here are the config files I have been working with on my broker.

Hope this makes sense. console2.txt
<http://activemq.2283324.n4.nabble.com/file/n4706166/console2.txt>   etc.zip
<http://activemq.2283324.n4.nabble.com/file/n4706166/etc.zip>



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706166.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706170.html
To unsubscribe from basic security tag in bootstrap.xml, click here<
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706184.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706186.html
To unsubscribe from basic security tag in bootstrap.xml, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4705994&code=c3RldmUucHJ1aXR0QGhwLmNvbXw0NzA1OTk0fDU0MzU1MTgyNg==>.
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


installed-artemis.zip (3M) <http://activemq.2283324.n4.nabble.com/attachment/4706187/0/installed-artemis.zip>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706187.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by Justin Bertram <jb...@apache.com>.
Can you provide a set of steps or something that I can use to reproduce what you're seeing?  I'm not real sure how to help beyond that.  Based on what you're saying I would expect it to work but there's obviously some other factor involved.  At the very least could you zip you configuration up and provide it to me?  

This should really be pretty straight-forward.


Justin

----- Original Message -----
From: "spruitt" <st...@hp.com>
To: users@activemq.apache.org
Sent: Tuesday, January 19, 2016 12:49:31 PM
Subject: RE: basic security tag in bootstrap.xml

Ok, I have something really wrong with my setup.  I copied all the server0/etc files to my installed broker.  Started the broker and then executed mvn -PnoServer verify and got this.

Default user cannot get a connection. Details: AMQ119031: Unable to validate user
User bill failed to connect. Details: AMQ119031: Unable to validate user
[ERROR]
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.activemq.artemis.maven.ArtemisClientPlugin.doExecute(ArtemisClientPlugin.java:61)
        at org.apache.activemq.artemis.maven.ArtemisAbstractPlugin.execute(ArtemisAbstractPlugin.java:75)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
:

This runs ok:   mvn verify

I copy the server0/etc folder to my installed broker and run mvn -PnoServer verify, start the broker service, and I get unable to validate user???



From: Justin Bertram-2 [via ActiveMQ] [mailto:ml-node+s2283324n4706170h74@n4.nabble.com]
Sent: Tuesday, January 19, 2016 12:30 PM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

Looking at your etc.zip...

Your bootstrap.xml looks fine.  The jaas-security domain is "activemq" (which is defined in login.config).

Your login.config looks fine.  It's using the default configuration.

However, your artemis-users.properties and artemis-roles.properties don't contain the users/roles that the example expects to be there.  That's why you get an authentication failure for the user "bill" when you run the example against your broker (e.g. using 'mvn -PnoServer verify').

Also, your broker.xml doesn't have the security-setting configuration that the example expects so even if you added the right users and roles to the properties files you'd still get failures when running the example against your broker.

You can take a look at each of these files from the example (i.e. artemis-users.properties, artemis-roles.properties, and broker.xml) to see what you need to change in your configuration to run the example successfully against your broker.

Just to be clear, the output you shared console2.txt is what I would expect from .  It looks to me like everything is working properly given the circumstances.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=1>
Sent: Tuesday, January 19, 2016 9:38:57 AM
Subject: Re: basic security tag in bootstrap.xml

yeah. i messed up.  Here is the console when not starting broker manually.

Also, here are the config files I have been working with on my broker.

Hope this makes sense. console2.txt
<http://activemq.2283324.n4.nabble.com/file/n4706166/console2.txt>   etc.zip
<http://activemq.2283324.n4.nabble.com/file/n4706166/etc.zip>



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706166.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706170.html
To unsubscribe from basic security tag in bootstrap.xml, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4705994&code=c3RldmUucHJ1aXR0QGhwLmNvbXw0NzA1OTk0fDU0MzU1MTgyNg==>.
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706184.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

RE: basic security tag in bootstrap.xml

Posted by spruitt <st...@hp.com>.
Ok, I have something really wrong with my setup.  I copied all the server0/etc files to my installed broker.  Started the broker and then executed mvn -PnoServer verify and got this.

Default user cannot get a connection. Details: AMQ119031: Unable to validate user
User bill failed to connect. Details: AMQ119031: Unable to validate user
[ERROR]
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.activemq.artemis.maven.ArtemisClientPlugin.doExecute(ArtemisClientPlugin.java:61)
        at org.apache.activemq.artemis.maven.ArtemisAbstractPlugin.execute(ArtemisAbstractPlugin.java:75)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
:

This runs ok:   mvn verify

I copy the server0/etc folder to my installed broker and run mvn -PnoServer verify, start the broker service, and I get unable to validate user???



From: Justin Bertram-2 [via ActiveMQ] [mailto:ml-node+s2283324n4706170h74@n4.nabble.com]
Sent: Tuesday, January 19, 2016 12:30 PM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

Looking at your etc.zip...

Your bootstrap.xml looks fine.  The jaas-security domain is "activemq" (which is defined in login.config).

Your login.config looks fine.  It's using the default configuration.

However, your artemis-users.properties and artemis-roles.properties don't contain the users/roles that the example expects to be there.  That's why you get an authentication failure for the user "bill" when you run the example against your broker (e.g. using 'mvn -PnoServer verify').

Also, your broker.xml doesn't have the security-setting configuration that the example expects so even if you added the right users and roles to the properties files you'd still get failures when running the example against your broker.

You can take a look at each of these files from the example (i.e. artemis-users.properties, artemis-roles.properties, and broker.xml) to see what you need to change in your configuration to run the example successfully against your broker.

Just to be clear, the output you shared console2.txt is what I would expect from .  It looks to me like everything is working properly given the circumstances.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=1>
Sent: Tuesday, January 19, 2016 9:38:57 AM
Subject: Re: basic security tag in bootstrap.xml

yeah. i messed up.  Here is the console when not starting broker manually.

Also, here are the config files I have been working with on my broker.

Hope this makes sense. console2.txt
<http://activemq.2283324.n4.nabble.com/file/n4706166/console2.txt>   etc.zip
<http://activemq.2283324.n4.nabble.com/file/n4706166/etc.zip>



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706166.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706170.html
To unsubscribe from basic security tag in bootstrap.xml, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4705994&code=c3RldmUucHJ1aXR0QGhwLmNvbXw0NzA1OTk0fDU0MzU1MTgyNg==>.
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706184.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

RE: basic security tag in bootstrap.xml

Posted by spruitt <st...@hp.com>.
I find myself in that unenviable position of too many moving parts / configurations.

I just ran the example again with the embedded broker and it ran ok.  The current configuration in server0/etc works.

Comparing...

server0/etc/artemis-roles.properties to my installed artemis-roles.properties there is no difference except the obvious differently defined roles.
server0/etc/artemis-users.properties to my installed artemis-users.properties there is no difference except the obvious differently defined users.
server0/etc/artemis-profile.cmd to my installed artemis-profile.cmd there is no difference except the artemis_home variable.
server0/etc/bootstrap.xml to my installed bootstrap .xml there is no difference except my bootstrap has the web app tag.
server0/etc/login.config to my installed login.config there is no difference except mine has GuestLoginModule set with admin, admin as user, role.  The server0/etc has guest, guest
server0/etc/broker.xml to my installed broker.xml there is several differences
server0/etc defines three topics, my installed version has deadletter and expiration queues defined.  I doubt this affects my problem.
my installed version defines under core tag:  name, persistence-enabled, journal-type, journal-min-files, journal-pool-files, and journal-buffer-timeout tags.  Again, I doubt this affects my problem.
server0/etc defines only a single acceptor netty-acceptor, my installed version defines artemis, amqp, stomp, hornet, mqtt.  I am very curious why the big differences.
server0/etc defines security-settings for the defined topics.  My installed version has wild card for any and all.

So it remains unclear to me, aside from the first time I ran I had the wrong broker.xml file in play, exactly what is causing my original problem.

I think my steps are:

copy wholesale the server0/etc files to my installed broker etc folder and run example with -PnoServer
if that is ok, then I will add my specific user (admin, user) to the user / roles files and modify the security example code to include a simple test for the new user.
If that is ok, then I will try executing my stand-alone example code where I have the problem.  if I still do, then there is something wrong with my broker install.

Any other ideas?

Thanks.


From: Justin Bertram-2 [via ActiveMQ] [mailto:ml-node+s2283324n4706170h74@n4.nabble.com]
Sent: Tuesday, January 19, 2016 12:30 PM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

Looking at your etc.zip...

Your bootstrap.xml looks fine.  The jaas-security domain is "activemq" (which is defined in login.config).

Your login.config looks fine.  It's using the default configuration.

However, your artemis-users.properties and artemis-roles.properties don't contain the users/roles that the example expects to be there.  That's why you get an authentication failure for the user "bill" when you run the example against your broker (e.g. using 'mvn -PnoServer verify').

Also, your broker.xml doesn't have the security-setting configuration that the example expects so even if you added the right users and roles to the properties files you'd still get failures when running the example against your broker.

You can take a look at each of these files from the example (i.e. artemis-users.properties, artemis-roles.properties, and broker.xml) to see what you need to change in your configuration to run the example successfully against your broker.

Just to be clear, the output you shared console2.txt is what I would expect from .  It looks to me like everything is working properly given the circumstances.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706170&i=1>
Sent: Tuesday, January 19, 2016 9:38:57 AM
Subject: Re: basic security tag in bootstrap.xml

yeah. i messed up.  Here is the console when not starting broker manually.

Also, here are the config files I have been working with on my broker.

Hope this makes sense. console2.txt
<http://activemq.2283324.n4.nabble.com/file/n4706166/console2.txt>   etc.zip
<http://activemq.2283324.n4.nabble.com/file/n4706166/etc.zip>



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706166.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706170.html
To unsubscribe from basic security tag in bootstrap.xml, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4705994&code=c3RldmUucHJ1aXR0QGhwLmNvbXw0NzA1OTk0fDU0MzU1MTgyNg==>.
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706183.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by Justin Bertram <jb...@apache.com>.
Looking at your etc.zip...

Your bootstrap.xml looks fine.  The jaas-security domain is "activemq" (which is defined in login.config).

Your login.config looks fine.  It's using the default configuration.

However, your artemis-users.properties and artemis-roles.properties don't contain the users/roles that the example expects to be there.  That's why you get an authentication failure for the user "bill" when you run the example against your broker (e.g. using 'mvn -PnoServer verify').

Also, your broker.xml doesn't have the security-setting configuration that the example expects so even if you added the right users and roles to the properties files you'd still get failures when running the example against your broker.

You can take a look at each of these files from the example (i.e. artemis-users.properties, artemis-roles.properties, and broker.xml) to see what you need to change in your configuration to run the example successfully against your broker.

Just to be clear, the output you shared console2.txt is what I would expect from .  It looks to me like everything is working properly given the circumstances.


Justin

----- Original Message -----
From: "spruitt" <st...@hp.com>
To: users@activemq.apache.org
Sent: Tuesday, January 19, 2016 9:38:57 AM
Subject: Re: basic security tag in bootstrap.xml

yeah. i messed up.  Here is the console when not starting broker manually.

Also, here are the config files I have been working with on my broker.

Hope this makes sense. console2.txt
<http://activemq.2283324.n4.nabble.com/file/n4706166/console2.txt>   etc.zip
<http://activemq.2283324.n4.nabble.com/file/n4706166/etc.zip>  



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706166.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by spruitt <st...@hp.com>.
yeah. i messed up.  Here is the console when not starting broker manually.

Also, here are the config files I have been working with on my broker.

Hope this makes sense. console2.txt
<http://activemq.2283324.n4.nabble.com/file/n4706166/console2.txt>   etc.zip
<http://activemq.2283324.n4.nabble.com/file/n4706166/etc.zip>  



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706166.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by Justin Bertram <jb...@apache.com>.
As noted in the readme.html in the example, if you want to start your own broker instance manually then you should execute the example with 'mvn -PnoServer verify' so that the plugin won't try starting it's own broker (which is the default behavior).

To be clear, just about every example is 100% self-contained (there are a couple exceptions).  By "self-contained" I mean that the example will do everything required to create the broker instance, configure the broker instance, start the broker instance, execute an example client, stop the broker instance, and report the result.

If you're starting your own broker instance manually then you also need to ensure it is configured correctly.  My guess is that you've missed something in your broker's configuration that is causing the example client to fail.  Can you provide details on your broker's configuration (e.g. bootstrap.xml, login.config, broker.xml, users/roles properties files)?


Justin

----- Original Message -----
From: "spruitt" <st...@hp.com>
To: users@activemq.apache.org
Sent: Tuesday, January 19, 2016 8:17:29 AM
Subject: Re: basic security tag in bootstrap.xml

Thanks for the time you are taking on this.  I suspect in the end its going
to be a dumb mistake on my part.

My steps.
0. manually started artemis broker (I have it installed as Windows service)
1. mkdir spruitt
2. cd spruitt
3. downloaded zip
4. unzipped
5. cd ../security
6 mvn verify

The console file I uploaded is with me starting artemis per step 0.
console.txt
<http://activemq.2283324.n4.nabble.com/file/n4706154/console.txt>  



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706154.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by spruitt <st...@hp.com>.
Thanks for the time you are taking on this.  I suspect in the end its going
to be a dumb mistake on my part.

My steps.
0. manually started artemis broker (I have it installed as Windows service)
1. mkdir spruitt
2. cd spruitt
3. downloaded zip
4. unzipped
5. cd ../security
6 mvn verify

The console file I uploaded is with me starting artemis per step 0.
console.txt
<http://activemq.2283324.n4.nabble.com/file/n4706154/console.txt>  



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706154.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by Justin Bertram <jb...@apache.com>.
Sorry, hit send too soon...

Here are the steps:

1. mkdir spruitt
2. cd spruit
3. wget http://mirrors.sonic.net/apache/activemq/activemq-artemis/1.2.0/apache-artemis-1.2.0-bin.zip
4. unzip apache-artemis-1.2.0-bin.zip
5. cd apache-artemis-1.2.0/examples/features/standard/security
6. mvn verify

Can you execute these steps and let me know the result?


Justin

----- Original Message -----
From: "Justin Bertram" <jb...@apache.com>
To: users@activemq.apache.org
Sent: Friday, January 15, 2016 3:05:18 PM
Subject: Re: basic security tag in bootstrap.xml

Could you outline the exact steps you are following to execute the example?

Also, when you say, "I just posted the results..." Where exactly did you post the results?

Here are the steps I just performed and everything worked as expected (i.e. the example ran without error)

1. 
1. 
1. 

----- Original Message -----
From: "spruitt" <st...@hp.com>
To: users@activemq.apache.org
Sent: Friday, January 15, 2016 10:38:59 AM
Subject: RE: basic security tag in bootstrap.xml

Justin,

I should have been more specific.  The html readme files have instructions and examples that appear to be only ActiveMQ.  My fault.

Also, I just posted the results from running the example examples/features/standard/security and I still get basically the same user authentication exception.

I mentioned there might be some basic knowledge you guys are assuming I know, but I don't for setting up the needed environment.  :>)   Not sure what it can be though.

I can't believe I am so stuck.

From: Justin Bertram-2 [via ActiveMQ] [mailto:ml-node+s2283324n4706046h30@n4.nabble.com]
Sent: Friday, January 15, 2016 11:34 AM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

To my knowledge Artemis only ships pure Artemis examples.  Where exactly where you looking where you found an ActiveMQ example in the Artemis distribution (or repo)?

Also, most of the examples should be using a file-based JAAS configuration.  The example at examples/features/standard/security definitely is.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706046&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706046&i=1>
Sent: Friday, January 15, 2016 9:20:16 AM
Subject: Re: basic security tag in bootstrap.xml

First, let thank the great community help.

All of my client rabbit holes I chased down led me to the real problem...
eventually.

Updating the documentation as Justin indicated resolve my basic issue.  I
might suggest detailing the bootstrap.xml documentation along the lines of
the broker.xml description.

Clebert suggested I look under examples/features/standard/security.  I did,
but the example is for ActiveMQ, so I didn't pursue it.  Another suggestion,
is update the example folders with pure Artemis examples.  Not sure about
you, but I rely heavily on example code and resources when I am coming up to
speed on something new.

Going forward.  I need to pursue JAAS for security.  I am still not sure how
to wire file-based credentials with the JAAS framework, but that is what I
will pickup today.  :>)

Thanks again.



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706038.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706046.html
To unsubscribe from basic security tag in bootstrap.xml, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4705994&code=c3RldmUucHJ1aXR0QGhwLmNvbXw0NzA1OTk0fDU0MzU1MTgyNg==>.
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706047.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by Justin Bertram <jb...@apache.com>.
Could you outline the exact steps you are following to execute the example?

Also, when you say, "I just posted the results..." Where exactly did you post the results?

Here are the steps I just performed and everything worked as expected (i.e. the example ran without error)

1. 
1. 
1. 

----- Original Message -----
From: "spruitt" <st...@hp.com>
To: users@activemq.apache.org
Sent: Friday, January 15, 2016 10:38:59 AM
Subject: RE: basic security tag in bootstrap.xml

Justin,

I should have been more specific.  The html readme files have instructions and examples that appear to be only ActiveMQ.  My fault.

Also, I just posted the results from running the example examples/features/standard/security and I still get basically the same user authentication exception.

I mentioned there might be some basic knowledge you guys are assuming I know, but I don't for setting up the needed environment.  :>)   Not sure what it can be though.

I can't believe I am so stuck.

From: Justin Bertram-2 [via ActiveMQ] [mailto:ml-node+s2283324n4706046h30@n4.nabble.com]
Sent: Friday, January 15, 2016 11:34 AM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

To my knowledge Artemis only ships pure Artemis examples.  Where exactly where you looking where you found an ActiveMQ example in the Artemis distribution (or repo)?

Also, most of the examples should be using a file-based JAAS configuration.  The example at examples/features/standard/security definitely is.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706046&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706046&i=1>
Sent: Friday, January 15, 2016 9:20:16 AM
Subject: Re: basic security tag in bootstrap.xml

First, let thank the great community help.

All of my client rabbit holes I chased down led me to the real problem...
eventually.

Updating the documentation as Justin indicated resolve my basic issue.  I
might suggest detailing the bootstrap.xml documentation along the lines of
the broker.xml description.

Clebert suggested I look under examples/features/standard/security.  I did,
but the example is for ActiveMQ, so I didn't pursue it.  Another suggestion,
is update the example folders with pure Artemis examples.  Not sure about
you, but I rely heavily on example code and resources when I am coming up to
speed on something new.

Going forward.  I need to pursue JAAS for security.  I am still not sure how
to wire file-based credentials with the JAAS framework, but that is what I
will pickup today.  :>)

Thanks again.



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706038.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706046.html
To unsubscribe from basic security tag in bootstrap.xml, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4705994&code=c3RldmUucHJ1aXR0QGhwLmNvbXw0NzA1OTk0fDU0MzU1MTgyNg==>.
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706047.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

RE: basic security tag in bootstrap.xml

Posted by spruitt <st...@hp.com>.
Justin,

I should have been more specific.  The html readme files have instructions and examples that appear to be only ActiveMQ.  My fault.

Also, I just posted the results from running the example examples/features/standard/security and I still get basically the same user authentication exception.

I mentioned there might be some basic knowledge you guys are assuming I know, but I don't for setting up the needed environment.  :>)   Not sure what it can be though.

I can't believe I am so stuck.

From: Justin Bertram-2 [via ActiveMQ] [mailto:ml-node+s2283324n4706046h30@n4.nabble.com]
Sent: Friday, January 15, 2016 11:34 AM
To: Pruitt, Byron S
Subject: Re: basic security tag in bootstrap.xml

To my knowledge Artemis only ships pure Artemis examples.  Where exactly where you looking where you found an ActiveMQ example in the Artemis distribution (or repo)?

Also, most of the examples should be using a file-based JAAS configuration.  The example at examples/features/standard/security definitely is.


Justin

----- Original Message -----
From: "spruitt" <[hidden email]</user/SendEmail.jtp?type=node&node=4706046&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4706046&i=1>
Sent: Friday, January 15, 2016 9:20:16 AM
Subject: Re: basic security tag in bootstrap.xml

First, let thank the great community help.

All of my client rabbit holes I chased down led me to the real problem...
eventually.

Updating the documentation as Justin indicated resolve my basic issue.  I
might suggest detailing the bootstrap.xml documentation along the lines of
the broker.xml description.

Clebert suggested I look under examples/features/standard/security.  I did,
but the example is for ActiveMQ, so I didn't pursue it.  Another suggestion,
is update the example folders with pure Artemis examples.  Not sure about
you, but I rely heavily on example code and resources when I am coming up to
speed on something new.

Going forward.  I need to pursue JAAS for security.  I am still not sure how
to wire file-based credentials with the JAAS framework, but that is what I
will pickup today.  :>)

Thanks again.



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706038.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706046.html
To unsubscribe from basic security tag in bootstrap.xml, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4705994&code=c3RldmUucHJ1aXR0QGhwLmNvbXw0NzA1OTk0fDU0MzU1MTgyNg==>.
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706047.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by Justin Bertram <jb...@apache.com>.
To my knowledge Artemis only ships pure Artemis examples.  Where exactly where you looking where you found an ActiveMQ example in the Artemis distribution (or repo)?

Also, most of the examples should be using a file-based JAAS configuration.  The example at examples/features/standard/security definitely is.


Justin

----- Original Message -----
From: "spruitt" <st...@hp.com>
To: users@activemq.apache.org
Sent: Friday, January 15, 2016 9:20:16 AM
Subject: Re: basic security tag in bootstrap.xml

First, let thank the great community help.

All of my client rabbit holes I chased down led me to the real problem...
eventually.

Updating the documentation as Justin indicated resolve my basic issue.  I
might suggest detailing the bootstrap.xml documentation along the lines of
the broker.xml description.

Clebert suggested I look under examples/features/standard/security.  I did,
but the example is for ActiveMQ, so I didn't pursue it.  Another suggestion,
is update the example folders with pure Artemis examples.  Not sure about
you, but I rely heavily on example code and resources when I am coming up to
speed on something new.

Going forward.  I need to pursue JAAS for security.  I am still not sure how
to wire file-based credentials with the JAAS framework, but that is what I
will pickup today.  :>)

Thanks again.



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706038.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by spruitt <st...@hp.com>.
First, let thank the great community help.

All of my client rabbit holes I chased down led me to the real problem...
eventually.

Updating the documentation as Justin indicated resolve my basic issue.  I
might suggest detailing the bootstrap.xml documentation along the lines of
the broker.xml description.

Clebert suggested I look under examples/features/standard/security.  I did,
but the example is for ActiveMQ, so I didn't pursue it.  Another suggestion,
is update the example folders with pure Artemis examples.  Not sure about
you, but I rely heavily on example code and resources when I am coming up to
speed on something new.

Going forward.  I need to pursue JAAS for security.  I am still not sure how
to wire file-based credentials with the JAAS framework, but that is what I
will pickup today.  :>)

Thanks again.



--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994p4706038.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by Justin Bertram <jb...@apache.com>.
Yes, I believe the documentation needs to be updated.  It still references the old non-JAAS basic security manager.  I'll take care of that.  In any event, the JAAS security manager works fine for AMQP as far as I can tell so I don't think this should be impacting this use-case.


Justin

----- Original Message -----
From: "Robbie Gemmell" <ro...@gmail.com>
To: users@activemq.apache.org
Sent: Friday, January 15, 2016 4:21:31 AM
Subject: Re: basic security tag in bootstrap.xml

Steve mentioned in a separate thread over on the Qpid users list that
he was following some documentation for Artemis when running into
these issues. Steve, can you link to the exact bits you were
following, perhaps it needs updated?

Robbie

On 15 January 2016 at 00:36, Justin Bertram <jb...@apache.com> wrote:
> The <basic-security> element was supported in previous versions of Artemis, but support was removed when <jaas-security> matured enough to make <basic-security> unnecessary.
>
>
> Justin
>
> ----- Original Message -----
> From: "spruitt" <st...@hp.com>
> To: users@activemq.apache.org
> Sent: Thursday, January 14, 2016 10:45:55 AM
> Subject: basic security tag in bootstrap.xml
>
> Can someone post an example of for the <basic-security> tab in the
> bootstrap.xml file.
>
> I left the <jaas-security domain="activemq"/> tag in the file and added
> this:
>
> <basic-security>
>    <users>file:${activemq.home}/etc/artemis-users.properties</users>
>    <roles>file:${activemq.home}/etc/artemis-roles.properties</roles>
>    <default-user>guest</default-user>
> </basic-security>
>
> Now Artemis broker throws a SAX parse exception
> Invalid content was found starting with element 'basic-security'. One of
> '{"http://activemq.org/schema":server}' is expected.
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by Robbie Gemmell <ro...@gmail.com>.
Steve mentioned in a separate thread over on the Qpid users list that
he was following some documentation for Artemis when running into
these issues. Steve, can you link to the exact bits you were
following, perhaps it needs updated?

Robbie

On 15 January 2016 at 00:36, Justin Bertram <jb...@apache.com> wrote:
> The <basic-security> element was supported in previous versions of Artemis, but support was removed when <jaas-security> matured enough to make <basic-security> unnecessary.
>
>
> Justin
>
> ----- Original Message -----
> From: "spruitt" <st...@hp.com>
> To: users@activemq.apache.org
> Sent: Thursday, January 14, 2016 10:45:55 AM
> Subject: basic security tag in bootstrap.xml
>
> Can someone post an example of for the <basic-security> tab in the
> bootstrap.xml file.
>
> I left the <jaas-security domain="activemq"/> tag in the file and added
> this:
>
> <basic-security>
>    <users>file:${activemq.home}/etc/artemis-users.properties</users>
>    <roles>file:${activemq.home}/etc/artemis-roles.properties</roles>
>    <default-user>guest</default-user>
> </basic-security>
>
> Now Artemis broker throws a SAX parse exception
> Invalid content was found starting with element 'basic-security'. One of
> '{"http://activemq.org/schema":server}' is expected.
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: basic security tag in bootstrap.xml

Posted by Justin Bertram <jb...@apache.com>.
The <basic-security> element was supported in previous versions of Artemis, but support was removed when <jaas-security> matured enough to make <basic-security> unnecessary.


Justin

----- Original Message -----
From: "spruitt" <st...@hp.com>
To: users@activemq.apache.org
Sent: Thursday, January 14, 2016 10:45:55 AM
Subject: basic security tag in bootstrap.xml

Can someone post an example of for the <basic-security> tab in the
bootstrap.xml file.

I left the <jaas-security domain="activemq"/> tag in the file and added
this:

<basic-security>
   <users>file:${activemq.home}/etc/artemis-users.properties</users>
   <roles>file:${activemq.home}/etc/artemis-roles.properties</roles>
   <default-user>guest</default-user>
</basic-security>

Now Artemis broker throws a SAX parse exception
Invalid content was found starting with element 'basic-security'. One of
'{"http://activemq.org/schema":server}' is expected.





--
View this message in context: http://activemq.2283324.n4.nabble.com/basic-security-tag-in-bootstrap-xml-tp4705994.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.