Karaf 4.4.5 
I am looking to implement security on a REST endpoint

@DeclareRoles("message-view")
@RolesAllowed("message-view")
@Path("/messageLog")
@Component(service = MessageLog.class)
@JaxrsResource
@JaxrsApplicationSelect("(osgi.jaxrs.name=myApi)")
public class MessageLog {
    private static final Logger LOGGER = 
LoggerFactory.getLogger(MessageLog.class);

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    @Path("/")
    public Response getMessageLog() {
...
}

When I added @DeclareRoles("message-view") @RolesAllowed("message-view") 
installing the bundle results in 

Error executing command: Unable to resolve com.foo.msg-rest [162](R 162.1): 
missing requirement [foo.bar.msg-rest [162](R 162.1)] osgi.wiring.package; 
(&(osgi.wiring.package=javax.annotation.security)(version>=1.3.0)(!(version>=2.0.0)))
 Unresolved requirements: [[foo.bar.msg-rest [162](R 162.1)] 
osgi.wiring.package; 
(&(osgi.wiring.package=javax.annotation.security)(version>=1.3.0)(!(version>=2.0.0)))]

I suspect this because I have not installed a required feature or bundle.  What 
is the the required feature or bundle?

Paul Spencer 

Reply via email to