Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No auto-grant roles have been configured. Please create at least one auto-grant role. #273

Closed
cmoulliard opened this issue Nov 16, 2015 · 4 comments

Comments

@cmoulliard
Copy link
Contributor

I have launched vertx3

apiman-core/gateway/platforms/vertx3/vertx3$ java -jar target/apiman-gateway-platforms-vertx3-1.2.0-SNAPSHOT-fat.jar -conf src/conf/conf.json 

and the manager-es

apiman-servers/manager-es/mvn exec:java -Dexec.mainClass="io.apiman.servers.manager_es.Starter"

When I try to create a new organisation with the Admin user in the UI screen, I get this error

io.apiman.manager.api.rest.contract.exceptions.SystemErrorException: No auto-grant roles have been configured.  Please create at least one auto-grant role.
    at io.apiman.manager.api.rest.impl.OrganizationResourceImpl.create(OrganizationResourceImpl.java:242)
    at io.apiman.manager.api.rest.impl.OrganizationResourceImpl$Proxy$_$$_WeldClientProxy.create(Unknown Source)
    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.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:168)
    at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269)
    at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227)
    at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216)
    at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:541)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:523)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:125)
    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
    at io.apiman.manager.api.micro.ManagerApiMicroServiceTxWatchdogFilter.doFilter(ManagerApiMicroServiceTxWatchdogFilter.java:57)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at io.apiman.common.servlet.RootResourceFilter.doFilter(RootResourceFilter.java:59)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at io.apiman.manager.api.security.impl.DefaultSecurityContextFilter.doFilter(DefaultSecurityContextFilter.java:56)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at io.apiman.common.servlet.AuthenticationFilter.doFilterChain(AuthenticationFilter.java:270)
    at io.apiman.common.servlet.AuthenticationFilter.doBasicAuth(AuthenticationFilter.java:238)
    at io.apiman.common.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:194)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at io.apiman.common.servlet.DisableCachingFilter.doFilter(DisableCachingFilter.java:59)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at io.apiman.common.servlet.ApimanCorsFilter.doFilter(ApimanCorsFilter.java:71)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at io.apiman.common.servlet.LocaleFilter.doFilter(LocaleFilter.java:61)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:497)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    at java.lang.Thread.run(Thread.java:745)
@cmoulliard
Copy link
Contributor Author

Problem resolved after creating an admin role. Maybe we should add this role by default when we use the microservice or mention it into the doc.

screenshot 2015-11-16 13 33 22

@donovanmuller
Copy link

Just ran into this on 1.2.5. This issue was closed but without any comment of it being fixed or if this is something that should be done after install etc.

Please advise. Need to know if this is something I need to cater for in an automated install or if a bug, will be addressed in future version?

@donovanmuller
Copy link

donovanmuller commented May 19, 2016

Ah ok, in my case this happened when using Elasticsearch as the manager storage type.
It seems that the setup/initialisation that happens for the jpa storage type does not happen for the es type (See #477). Hence this error...

@EricWittmann
Copy link
Member

Yes, exactly. I commented on #477 above. As a workaround for now, you can either manually configure the things that are missing, or you can import everything in one shot using this file:

https://github.com/apiman/apiman/blob/master/distro/data/src/main/resources/bootstrap/apiman-default-config.json

To use this file, download it and then go to the Export/Import admin UI page and import it. :)

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

No branches or pull requests

3 participants