[Apiman-user] CORS

Eric Wittmann eric.wittmann at redhat.com
Mon Aug 17 14:56:47 EDT 2015


Correction on my instructions below.  Thanks to msavy for pointing this out:

git clone git at github.com:apiman/apiman.git
cd apiman
git checkout 1.1.x
mvn clean install -DskipTests
ls -al
distro/wildfly8/target/apiman-distro-wildfly8-1.1.7-SNAPSHOT-overlay.zip

Also don't forget to use 1.1.7-SNAPSHOT when you install the CORS plugin.

-Eric

On 8/17/2015 2:47 PM, Eric Wittmann wrote:
> If you build apiman from source using maven, the same ZIP file you've
> been using via the download mechanism will be created.  For example:
>
> git clone git at github.com:apiman/apiman.git
> cd apiman
> git checkout 1.1.x
> mvn clean install -DskipTests
> ls -al
> distro/wildfly8/target/apiman-distro-wildfly8-1.2.0-SNAPSHOT-overlay.zip
>
> That file should now exist - you can copy it off somewhere and use it
> just like the one you normally download.
>
> For the plugin, you simply need to check out the code and build it. Then
> you can add the plugin via the UI as normal.  Example:
>
> git clone git at github.com:apiman/apiman-plugins.git
> cd apiman-plugins
> mvn clean install
>
> Then use the UI to install it.
>
> -Eric
>
> On 8/17/2015 2:11 PM, Fadi Abdin wrote:
>> yeah i can wait.
>>
>> The way i run apiman is by downloading wildfly and the apiman-overlay
>> zip files and then unzip and run ..
>>
>> Do you have instructions somewhere to update with a new version by
>> building the code ? i can mvn install and drop the files , but i dont
>> think this is enough , is it ?
>>
>> On Mon, Aug 17, 2015 at 2:02 PM, Eric Wittmann <eric.wittmann at redhat.com
>> <mailto:eric.wittmann at redhat.com>> wrote:
>>
>>     Or if you can wait for 30 minutes you can do all this from 'master'
>>     or from the '1.1.x' branch.  :)
>>
>>     -Eric
>>
>>
>>     On 8/17/2015 1:32 PM, Marc Savy wrote:
>>
>>         Hi Fadi,
>>
>>         Please feel free to try this out - you'll be building
>> 1.1.7-SNAPSHOT
>>         of apiman/apiman and apiman/apiman-plugins.
>>
>>         apiman:
>>
>>         git fetch origin pull/180/head:fix-cors
>>         git checkout fix-cors
>>         mvn clean install
>>
>>         apiman-plugins:
>>
>>         git fetch origin pull/26/head:fix-cors
>>         git checkout fix-cors
>>         mvn clean install
>>
>>         Make sure you build them in the order shown above and use
>>         1.1.7-SNAPSHOT
>>         of the CORS plugin.
>>
>>         This is using a snapshot from my PRs, so please don't forget
>>         about it
>>         later, otherwise you'll be stuck on an old version!
>>
>>         Regards,
>>         Marc
>>
>>         On 17/08/2015 16:38, Fadi Abdin wrote:
>>
>>             cool .. you're the man ;)
>>
>>
>>             On Mon, Aug 17, 2015 at 11:37 AM, Marc Savy
>>             <marc.savy at redhat.com <mailto:marc.savy at redhat.com>
>>             <mailto:marc.savy at redhat.com <mailto:marc.savy at redhat.com>>>
>>             wrote:
>>
>>                   I'm actually testing the fix right now. It will land
>>             both on the 1.2.x
>>                   branch and the 1.1.x branch shortly. You should be
>>             able to test it out
>>                   in a short while: I'll send you an email when it's
>>             available.
>>
>>                   On 17/08/2015 16:23, Fadi Abdin wrote:
>>
>>                       Thank you Marc,
>>                       Is there a work around that you can think of ?
>>                       I'm doing it with angularjs  , very simple
>>
>>                       $http({method: 'GET', url:
>>             'http://server/apiman-gateway/service',
>>                       headers: {
>>                             'Authorization': 'Bearer XXXXXXXXXXXXX'}
>>                       });
>>
>>                       I assume you will fix it in the new version ,
>> right?
>>
>>
>>
>>                       On Mon, Aug 17, 2015 at 10:52 AM, Marc Savy
>>                       <marc.savy at redhat.com
>>             <mailto:marc.savy at redhat.com> <mailto:marc.savy at redhat.com
>>             <mailto:marc.savy at redhat.com>>
>>                       <mailto:marc.savy at redhat.com
>>             <mailto:marc.savy at redhat.com> <mailto:marc.savy at redhat.com
>>             <mailto:marc.savy at redhat.com>>>> wrote:
>>
>>                            Hi,
>>
>>                            This is related to the JIRA I linked you to
>>                            (https://issues.jboss.org/browse/APIMAN-516).
>>             Because of
>>                       the way the
>>                            policy chain currently works the behaviour of
>>             CORS is
>>                       invalid in a
>>                            few very specific cases (e.g. when you stack
>>             it with an auth
>>                            policy). I'll let you know when it's fixed.
>>
>>                            Regards,
>>                            Marc
>>
>>                            On 17/08/2015 15:44, Fadi Abdin wrote:
>>
>>                                I have a problem in calling a service in
>>             apiman-gateway
>>                       with the
>>                                Authorization: Bearer <token> in the
>> header.
>>
>>                                It seems to preflight OPTIONS and return
>>
>>                                  1.
>>                                     X-Policy-Failure-Message:
>>                                     OAuth2 'Authorization' header or
>>             'access_token' query
>>                                parameter must
>>                                     be provided.
>>
>>                                I am sending the bearer token with the
>>             request and i
>>                       make sure
>>                                in the
>>                                preflight its sent in the request.
>>
>>                                  1.
>>                                     Access-Control-Request-Headers:
>>                                     accept, authorization
>>
>>                                Does anyone know if there Is something
>>             i'm missing ?
>>                       do i need
>>                                to get
>>                                authorization enabled or added anywhere ?
>>             as a side
>>                       note i have
>>                                below in
>>                                my api as well:
>>
>>
>>             response.setHeader("Access-Control-Allow-Headers",
>>                       "Authorization");
>>
>>
>>
>>             _______________________________________________
>>                                Apiman-user mailing list
>>             Apiman-user at lists.jboss.org
>>             <mailto:Apiman-user at lists.jboss.org>
>>             <mailto:Apiman-user at lists.jboss.org
>>             <mailto:Apiman-user at lists.jboss.org>>
>>                       <mailto:Apiman-user at lists.jboss.org
>>             <mailto:Apiman-user at lists.jboss.org>
>>                       <mailto:Apiman-user at lists.jboss.org
>>             <mailto:Apiman-user at lists.jboss.org>>>
>>             https://lists.jboss.org/mailman/listinfo/apiman-user
>>
>>
>>
>>
>>
>>
>>         _______________________________________________
>>         Apiman-user mailing list
>>         Apiman-user at lists.jboss.org <mailto:Apiman-user at lists.jboss.org>
>>         https://lists.jboss.org/mailman/listinfo/apiman-user
>>
>>


More information about the Apiman-user mailing list