<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Find Answers For ... - Recent questions tagged annotations</title>
<link>https://find4answers.com/tag/annotations</link>
<description>Powered by Question2Answer</description>
<item>
<title>Jersey JAX-RS, Tomcat, Basic Auth and Security Annotations</title>
<link>https://find4answers.com/62/jersey-jax-rs-tomcat-basic-auth-and-security-annotations</link>
<description>&lt;p&gt;
	I need to secure a simple jersey RESTful API in a Tomcat 6.0.24 container. I&#039;d like to keep the authentication with Basic Authentication using the tomcat-users.xml file to define the users and roles (this is for now, like I said its small).&lt;/p&gt;
&lt;p&gt;
	Now, for authorization I&#039;d like to be able to use the JSR 250 annotations like @RolesAllowed, @PermitAll, @DenyAll, etc.&lt;/p&gt;
&lt;p&gt;
	I cannot for the life of me figure out how to wire this all up together.&lt;/p&gt;
&lt;p&gt;
	I really don&#039;t want to go spring-security route, since I need something very simple at the current time.&lt;/p&gt;
&lt;p&gt;
	Can someone point me in the right direction.&lt;/p&gt;
&lt;p&gt;
	In short,&amp;nbsp;&amp;nbsp;how best to wire up a &lt;strong&gt;&lt;em&gt;simple security&lt;/em&gt;&lt;/strong&gt; mechanism for:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;
		Jersey JAX-RS.&lt;/li&gt;
	&lt;li&gt;
		Tomcat.&lt;/li&gt;
	&lt;li&gt;
		Basic Authentication.&lt;/li&gt;
	&lt;li&gt;
		JSR 250 Annotations such as @RolesAllowed.&lt;/li&gt;
&lt;/ol&gt;</description>
<category>Java/J2EE</category>
<guid isPermaLink="true">https://find4answers.com/62/jersey-jax-rs-tomcat-basic-auth-and-security-annotations</guid>
<pubDate>Fri, 06 Jan 2012 06:03:47 +0000</pubDate>
</item>
</channel>
</rss>