Test API Gateway and Axway PassPort configuration

To test the configuration of API Gateway and Axway PassPort you can use the Curl testing utility.

If API Gateway is running on a machine called apigateway on the default port of 8080, to send a POST request to the authorization policy on the API Gateway using HTTP basic authentication, enter the following command:

> curl -X POST --user batman:password --data "test=data" http://apigateway:8080/batcave

User 'batman' was authorized successfully!

This is batman attempting to modify the batcave. Batman has the Modify Lair privilege and is successfully authorized.

If robin attempts the same request he is rejected:

> curl -X POST --user robin:password --data "test=data" http://apigateway:8080/batcave

User 'robin' was NOT authorized to access the resource successfully!

However, if robin attempts a GET request then he is successful as he has the View Lair privilege:

> curl -X GET --user robin:password http://apigateway:8080/batcave

User 'robin' was authorized successfully!

Related Links