From ah at magick.nu Fri Feb 13 17:19:13 2015 From: ah at magick.nu (Anton Hughes) Date: Sat, 14 Feb 2015 11:19:13 +1300 Subject: [Apiman-user] Help with migrating to use postgres Message-ID: Hi We have been testing Apiman - and are really impressed with it! We are now looking to move to use postgres db. We are following the documentation on http://www.apiman.io/latest/installation-guide.html#_api_manager_database - and it looks like database and all tables are created correctly. However, when I login as admin, and try to add an organization, I get the following, below error. Does anyone know the cause - and how to solve this? Thanks and regards Server Error! Oh boy. This one is totally on us. Something really unexpected happened on the server and caused an error. It's not you, it's me. Really. You could probably just try it again and see what happens. If it keeps on happening you may need to contact someone about it. Error Message Error Details 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:180) 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:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) at io.apiman.manager.api.security.impl.DefaultSecurityContextFilter.doFilter(DefaultSecurityContextFilter.java:56) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) at org.overlord.commons.gwt.server.filters.SimpleCorsFilter.doFilter(SimpleCorsFilter.java:71) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) at org.overlord.commons.i18n.server.filters.LocaleFilter.doFilter(LocaleFilter.java:61) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at org.keycloak.adapters.undertow.UndertowAuthenticatedActionsHandler.handleRequest(UndertowAuthenticatedActionsHandler.java:66) at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51) at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56) at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at org.keycloak.adapters.undertow.ServletPreAuthActionsHandler.handleRequest(ServletPreAuthActionsHandler.java:69) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) -- *Anton Hughes* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20150214/4309a834/attachment.html From discolo at gmail.com Fri Feb 13 18:58:39 2015 From: discolo at gmail.com (Ruben Romero) Date: Sat, 14 Feb 2015 00:58:39 +0100 Subject: [Apiman-user] Help with migrating to use postgres In-Reply-To: References: Message-ID: Hello Andrei, I think I can answer this one. You need to create a role with the autogrant option enabled because any organisation requires the users to have at least one role. The "problem" is that the postgres db is not populated by defult as the h2. If I remember well there's one video explaining how to start with the roles and organisations. Kind regards, Ruben Romero On Feb 13, 2015 11:19 PM, "Anton Hughes" wrote: > Hi > > We have been testing Apiman - and are really impressed with it! > > We are now looking to move to use postgres db. > > We are following the documentation on > http://www.apiman.io/latest/installation-guide.html#_api_manager_database > - and it looks like database and all tables are created correctly. > > However, when I login as admin, and try to add an organization, I get the > following, below error. > > Does anyone know the cause - and how to solve this? > > Thanks and regards > > Server Error! > Oh boy. This one is totally on us. Something really unexpected happened on > the server and caused an error. It's not you, it's me. Really. You could > probably just try it again and see what happens. If it keeps on happening > you may need to contact someone about it. > Error Message > Error Details > > 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:180) > 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:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) > at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296) > at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250) > at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237) > at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) > at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) > at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) > at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) > at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) > at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) > at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) > at io.apiman.manager.api.security.impl.DefaultSecurityContextFilter.doFilter(DefaultSecurityContextFilter.java:56) > at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) > at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) > at org.overlord.commons.gwt.server.filters.SimpleCorsFilter.doFilter(SimpleCorsFilter.java:71) > at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) > at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) > at org.overlord.commons.i18n.server.filters.LocaleFilter.doFilter(LocaleFilter.java:61) > at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) > at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) > at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) > at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) > at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) > at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) > at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) > at org.keycloak.adapters.undertow.UndertowAuthenticatedActionsHandler.handleRequest(UndertowAuthenticatedActionsHandler.java:66) > at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) > at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) > at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33) > at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) > at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51) > at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) > at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) > at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56) > at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) > at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) > at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) > at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) > at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) > at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) > at org.keycloak.adapters.undertow.ServletPreAuthActionsHandler.handleRequest(ServletPreAuthActionsHandler.java:69) > at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) > at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) > at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) > at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) > at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) > at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) > at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > > > -- > > > > > > *Anton Hughes* > > _______________________________________________ > Apiman-user mailing list > Apiman-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/apiman-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20150214/3c7a9db1/attachment-0001.html From ah at magick.nu Fri Feb 13 20:12:21 2015 From: ah at magick.nu (Anton Hughes) Date: Sat, 14 Feb 2015 14:12:21 +1300 Subject: [Apiman-user] Help with migrating to use postgres In-Reply-To: References: Message-ID: Thanks Ruben - that worked. On Sat, Feb 14, 2015 at 12:58 PM, Ruben Romero wrote: > Hello Andrei, > I think I can answer this one. You need to create a role with the > autogrant option enabled because any organisation requires the users to > have at least one role. The "problem" is that the postgres db is not > populated by defult as the h2. If I remember well there's one video > explaining how to start with the roles and organisations. > > Kind regards, > Ruben Romero > On Feb 13, 2015 11:19 PM, "Anton Hughes" wrote: > >> Hi >> >> We have been testing Apiman - and are really impressed with it! >> >> We are now looking to move to use postgres db. >> >> We are following the documentation on >> http://www.apiman.io/latest/installation-guide.html#_api_manager_database >> - and it looks like database and all tables are created correctly. >> >> However, when I login as admin, and try to add an organization, I get the >> following, below error. >> >> Does anyone know the cause - and how to solve this? >> >> Thanks and regards >> >> Server Error! >> Oh boy. This one is totally on us. Something really unexpected happened >> on the server and caused an error. It's not you, it's me. Really. You could >> probably just try it again and see what happens. If it keeps on happening >> you may need to contact someone about it. >> Error Message >> Error Details >> >> 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:180) >> 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:57) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:606) >> at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) >> at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296) >> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250) >> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237) >> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) >> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) >> at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) >> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) >> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) >> at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) >> at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) >> at io.apiman.manager.api.security.impl.DefaultSecurityContextFilter.doFilter(DefaultSecurityContextFilter.java:56) >> at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) >> at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) >> at org.overlord.commons.gwt.server.filters.SimpleCorsFilter.doFilter(SimpleCorsFilter.java:71) >> at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) >> at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) >> at org.overlord.commons.i18n.server.filters.LocaleFilter.doFilter(LocaleFilter.java:61) >> at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) >> at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) >> at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) >> at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) >> at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) >> at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) >> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) >> at org.keycloak.adapters.undertow.UndertowAuthenticatedActionsHandler.handleRequest(UndertowAuthenticatedActionsHandler.java:66) >> at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) >> at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) >> at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33) >> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) >> at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51) >> at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) >> at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) >> at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56) >> at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) >> at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) >> at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) >> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) >> at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) >> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) >> at org.keycloak.adapters.undertow.ServletPreAuthActionsHandler.handleRequest(ServletPreAuthActionsHandler.java:69) >> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) >> at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) >> at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) >> at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) >> at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) >> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) >> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) >> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) >> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) >> at java.lang.Thread.run(Thread.java:745) >> >> >> -- >> >> >> >> >> >> *Anton Hughes* >> >> _______________________________________________ >> Apiman-user mailing list >> Apiman-user at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/apiman-user >> >> -- *Anton HughesCo-founderah at magick.nu www.magick.nu * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20150214/ac3f039d/attachment.html From ah at magick.nu Fri Feb 13 20:51:59 2015 From: ah at magick.nu (Anton Hughes) Date: Sat, 14 Feb 2015 14:51:59 +1300 Subject: [Apiman-user] Help with migrating to use postgres v2 Message-ID: Hi all This is following on from a previous thread related to migrating from h2 to postgres. Thanks to Ruben who answered my previous question, related to roles. I now see that there is a lot of setup to do, such as setting up: - gateway - plugins - policy definitions. Does anyone know of a simply way to migrate data from h2 to postgres? Or is there away to populate postgres with the above, default, values/settings? Thanks and regards Anton -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20150214/962ed7ee/attachment.html From eric.wittmann at redhat.com Fri Feb 13 22:22:44 2015 From: eric.wittmann at redhat.com (Eric Wittmann) Date: Fri, 13 Feb 2015 22:22:44 -0500 Subject: [Apiman-user] Help with migrating to use postgres v2 In-Reply-To: References: Message-ID: <54DEBF84.3090706@redhat.com> We really should have the data available in a DML of some kind, perhaps. However, that's not available currently, so your best bet is to configure everything manually via the UI. That sounds hard but it really isn't! 1. Roles - create whatever roles you think you'll need. We recommend *at least* a role equivalent to Organization Owner which grants all permissions and is set to auto-grant:true. 2. Gateway - create a gateway with the following settings: Name: Gateway Description: Something sensible. :) Configuration Endpoint: http://localhost:8080/apiman-gateway-api/ Username: apimanager Password: apiman123! (Use the Test Gateway button to make sure the settings work!) Note: better to set the configuration endpoint to the hostname of the server, rather than localhost, if possible. 3. Policy Definitions - these can all be imported in a single shot. Simply click import policy and then copy/paste the contents of "all-policyDefs.json" into the big text area. That file can be found in the distro, or you can use what's here: https://raw.githubusercontent.com/apiman/apiman/master/distro/data/src/main/resources/data/all-policyDefs.json 4. Profit! -Eric PS: we have a little java unit test that does all this, but it's honestly easier to just use the UI to configure everything than tweak the unit test settings to do it automatically. PPS: once you have everything configured manually, maybe do a dump of the postgresql db to make it easier to do again if necessary... On 2/13/2015 8:51 PM, Anton Hughes wrote: > Hi all > > This is following on from a previous thread related to migrating from h2 > to postgres. > > Thanks to Ruben who answered my previous question, related to roles. > > I now see that there is a lot of setup to do, such as setting up: > > * gateway > * plugins > * policy definitions. > > Does anyone know of a simply way to migrate data from h2 to postgres? > Or is there away to populate postgres with the above, default, > values/settings? > > Thanks and regards > Anton > * > > > > * > > > * > > ** > > * > > > _______________________________________________ > Apiman-user mailing list > Apiman-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/apiman-user > From eric.wittmann at redhat.com Mon Feb 16 11:24:19 2015 From: eric.wittmann at redhat.com (Eric Wittmann) Date: Mon, 16 Feb 2015 11:24:19 -0500 Subject: [Apiman-user] Help with migrating to use postgres v2 In-Reply-To: References: Message-ID: <54E219B3.8050900@redhat.com> I just realized I didn't mention anything about plugins. You don't need to do anything at all with plugins at this point. In the future we will hopefully have a nice long selection of community produced plugins, but at the moment there really aren't any. This means the plugin feature is really so that you can create your own custom policies if needed. Bottom line: you can skip the plugins section of the admin. :) -Eric On 2/13/2015 8:51 PM, Anton Hughes wrote: > Hi all > > This is following on from a previous thread related to migrating from h2 > to postgres. > > Thanks to Ruben who answered my previous question, related to roles. > > I now see that there is a lot of setup to do, such as setting up: > > * gateway > * plugins > * policy definitions. > > Does anyone know of a simply way to migrate data from h2 to postgres? > Or is there away to populate postgres with the above, default, > values/settings? > > Thanks and regards > Anton > * > > > > * > > > * > > ** > > * > > > _______________________________________________ > Apiman-user mailing list > Apiman-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/apiman-user > From eric.wittmann at redhat.com Tue Feb 17 15:37:35 2015 From: eric.wittmann at redhat.com (Eric Wittmann) Date: Tue, 17 Feb 2015 15:37:35 -0500 Subject: [Apiman-user] Announcement: New Release - 1.0.3.Final Message-ID: <54E3A68F.1050602@redhat.com> Hey everyone. We're happy to announce that we have released apiman version 1.0.3.Final. This release is primarily a bug-fix release, but it does have a couple of interesting new features as well. In particular there is now back-end support for storing a Service Definition Document with each Service. This is not yet supported in the UI, unfortunately. But the idea is that a Service Provider will be able to store, for example, a Swagger spec or a WSDL with their service. That file can serve as documentation for the service, eventually with UI support for browsing the Service Definition. Additionally we have a new CORS policy available as a plugin: Group ID: io.apiman.plugins Artifact ID: apiman-plugins-cors-policy Version: 1.0.3.Final You can add that plugin to your apiman installation and then enable CORS support for your services by adding the CORS policy! Full release notes can be found here: https://issues.jboss.org/secure/ReleaseNote.jspa?projectId=12314121&version=12326633 And of course as always, you can find the latest apiman release here: http://www.apiman.io/latest/ From ah at magick.nu Wed Feb 18 00:23:56 2015 From: ah at magick.nu (Anton Hughes) Date: Wed, 18 Feb 2015 18:23:56 +1300 Subject: [Apiman-user] Help with migrating to use postgres v2 In-Reply-To: <54DEBF84.3090706@redhat.com> References: <54DEBF84.3090706@redhat.com> Message-ID: Thanks Eric This is perfect. I followed your instructions and all is good! Thanks again On Sat, Feb 14, 2015 at 4:22 PM, Eric Wittmann wrote: > We really should have the data available in a DML of some kind, perhaps. > However, that's not available currently, so your best bet is to configure > everything manually via the UI. > > That sounds hard but it really isn't! > > 1. Roles - create whatever roles you think you'll need. We recommend *at > least* a role equivalent to Organization Owner which grants all permissions > and is set to auto-grant:true. > > 2. Gateway - create a gateway with the following settings: > > Name: Gateway > Description: Something sensible. :) > Configuration Endpoint: http://localhost:8080/apiman-gateway-api/ > Username: apimanager > Password: apiman123! > > (Use the Test Gateway button to make sure the settings work!) > > Note: better to set the configuration endpoint to the hostname of the > server, rather than localhost, if possible. > > 3. Policy Definitions - these can all be imported in a single shot. Simply > click import policy and then copy/paste the contents of > "all-policyDefs.json" into the big text area. That file can be found in > the distro, or you can use what's here: https://raw.githubusercontent. > com/apiman/apiman/master/distro/data/src/main/ > resources/data/all-policyDefs.json > > 4. Profit! > > -Eric > > PS: we have a little java unit test that does all this, but it's honestly > easier to just use the UI to configure everything than tweak the unit test > settings to do it automatically. > > PPS: once you have everything configured manually, maybe do a dump of the > postgresql db to make it easier to do again if necessary... > > On 2/13/2015 8:51 PM, Anton Hughes wrote: > >> Hi all >> >> This is following on from a previous thread related to migrating from h2 >> to postgres. >> >> Thanks to Ruben who answered my previous question, related to roles. >> >> I now see that there is a lot of setup to do, such as setting up: >> >> * gateway >> * plugins >> * policy definitions. >> >> Does anyone know of a simply way to migrate data from h2 to postgres? >> Or is there away to populate postgres with the above, default, >> values/settings? >> >> Thanks and regards >> Anton >> * >> >> >> >> * >> >> >> * >> >> ** >> >> * >> >> >> _______________________________________________ >> Apiman-user mailing list >> Apiman-user at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/apiman-user >> >> -- *Anton HughesCo-founderah at magick.nu www.magick.nu * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20150218/47419455/attachment.html From eric.wittmann at redhat.com Wed Feb 18 07:53:21 2015 From: eric.wittmann at redhat.com (Eric Wittmann) Date: Wed, 18 Feb 2015 07:53:21 -0500 Subject: [Apiman-user] Help with migrating to use postgres v2 In-Reply-To: References: <54DEBF84.3090706@redhat.com> Message-ID: <54E48B41.9020407@redhat.com> Great! Now to throw a little wrench in the works. :) We just released 1.0.3.Final and there is a slight change to the schema. There is a new table and a new row to an existing table. As we don't have any DB migration strategy (yet) you'll need to either let hibernate upgrade your schema or create your own migration DDL. To help with the latter, here are the DDL changes between 1.0.2 and 1.0.3: https://gist.github.com/EricWittmann/c62456b5ff2424cd441b And sadly, the 1.0.3 release was released with a bug in the mysql and postgres schemas - they are missing the new 'definitionType' column in the 'service_versions' table. As a result, I am filled with self loathing! -Eric PS: the missing column problem is fixed of course - latest schemas for 1.0.x can be found here: https://github.com/apiman/apiman/tree/1.0.x/distro/wildfly8/src/main/resources/overlay/apiman/ddls On 2/18/2015 12:23 AM, Anton Hughes wrote: > Thanks Eric > > This is perfect. I followed your instructions and all is good! > > Thanks again > > On Sat, Feb 14, 2015 at 4:22 PM, Eric Wittmann > wrote: > > We really should have the data available in a DML of some kind, > perhaps. However, that's not available currently, so your best bet > is to configure everything manually via the UI. > > That sounds hard but it really isn't! > > 1. Roles - create whatever roles you think you'll need. We > recommend *at least* a role equivalent to Organization Owner which > grants all permissions and is set to auto-grant:true. > > 2. Gateway - create a gateway with the following settings: > > Name: Gateway > Description: Something sensible. :) > Configuration Endpoint: http://localhost:8080/apiman-__gateway-api/ > > Username: apimanager > Password: apiman123! > > (Use the Test Gateway button to make sure the settings work!) > > Note: better to set the configuration endpoint to the hostname of > the server, rather than localhost, if possible. > > 3. Policy Definitions - these can all be imported in a single shot. > Simply click import policy and then copy/paste the contents of > "all-policyDefs.json" into the big text area. That file can be > found in the distro, or you can use what's here: > https://raw.githubusercontent.__com/apiman/apiman/master/__distro/data/src/main/__resources/data/all-policyDefs.__json > > > 4. Profit! > > -Eric > > PS: we have a little java unit test that does all this, but it's > honestly easier to just use the UI to configure everything than > tweak the unit test settings to do it automatically. > > PPS: once you have everything configured manually, maybe do a dump > of the postgresql db to make it easier to do again if necessary... > > On 2/13/2015 8:51 PM, Anton Hughes wrote: > > Hi all > > This is following on from a previous thread related to migrating > from h2 > to postgres. > > Thanks to Ruben who answered my previous question, related to roles. > > I now see that there is a lot of setup to do, such as setting up: > > * gateway > * plugins > * policy definitions. > > Does anyone know of a simply way to migrate data from h2 to > postgres? > Or is there away to populate postgres with the above, default, > values/settings? > > Thanks and regards > Anton > * > > > > * > > > * > > ** > > * > > > _________________________________________________ > Apiman-user mailing list > Apiman-user at lists.jboss.org > https://lists.jboss.org/__mailman/listinfo/apiman-user > > > > > > -- > * > > ** > > * > * > > Anton Hughes > > Co-founder > > ah at magick.nu > > www.magick.nu > > > > > > * > > > * > > ** > > * From eric.wittmann at redhat.com Thu Feb 26 04:25:21 2015 From: eric.wittmann at redhat.com (Eric Wittmann) Date: Thu, 26 Feb 2015 04:25:21 -0500 (EST) Subject: [Apiman-user] apiman and OAuth In-Reply-To: <778838321.5806692.1424941920705.JavaMail.zimbra@redhat.com> Message-ID: <1681751729.5808951.1424942721937.JavaMail.zimbra@redhat.com> Hi Michael, Len DiMaggio forwarded me your question about OAuth and apiman. The short answer is that we have a plugin (targeted for apiman 1.1.0) that adds support for authenticating via Keycloak OAuth bearer token. Some links: The plugin: https://github.com/apiman/apiman-plugins/tree/master/keycloak-oauth-policy Keycloak: http://keycloak.jboss.org/ Once we release version 1.1 in a month or so, you will be able to simply add the Keycloak OAuth Policy Plugin to apiman via the apiman admin UI using the official version of the plugin. For now you would need to built it from source (mvn clean install) so that the SNAPSHOT version is available in your .m2 directory. If you do that, you can add it to your apiman installation to try it out: GroupId: io.apiman.plugins ArtifactId: apiman-plugins-keycloak-oauth-policy Version: 1.1.0-SNAPSHOT This policy works with keycloak - so all it does is validate the OAuth bearer token in the request, using the Keycloak Realm Name and Realm Key (which is configured when the policy is set up in apiman). apiman does not issue OAuth tokens - we rely on keycloak for that. If you have an existing OAuth solution, you would need to write a custom plugin to authenticate the OAuth bearer token issued by your OAuth solution of choice. It should be easy to do that by following the example in github. I hope that helps! -Eric