Skip to content

apigrove GUI API basic authentication

bradleywangia edited this page Sep 28, 2012 · 3 revisions

Purpose

This tutorial demonstrates how to restrict access to your API to apiGrove using an basic authentication

Prerequisites

Please ensure the following prerequites are met

  • A working install of apiGrove and apiGroveGUI
  • A web browser

Instructions

Create the API

  1. Open your installed apiGrove GUI url in a browser
  2. Login to apiGroveGUI /dev/images/apiGroveGUI_Login.png
  3. Click on API in the top menu
  4. Click Create New
  5. Enter a Name for your API 'myBasicAuthTweets'
  6. Enter an Endpoint
  7. Enter the target host where this API is hosted
  8. Click Advanced button
  9. Click The Enabled button (makes your API active immediately upon creation)
  10. Click the ‘Basic’ button for Authenitcation Type
  11. Leave the HTTPS button unclicked
  12. Enter 9 for the Transactions Per Second (TPS) Threshold
  13. Enter 10 for the Transactions Per Minute (TPM) Threshold
  14. Select the GET button for allowed HTTP calls
  15. Click Save /dev/images/apiGroveGUI_APIBasic2.png
  16. apiGrove GUI returns a success message and lists your onboarded API

Create the Auth

  1. Click on Auth in the top menu
  2. Click Create New
  3. Enter an ID 'basictwitter' for this auth
  4. Enter username test
  5. Enter password tester
  6. Click Save
  7. 'basictwitter' is displayed in a listing of your auths

Create a policy

The policy associates the auth with your API.

  1. Click on Policy in the top menu
  2. Click Create New
  3. Enter ID twittterBasicPolicy
  4. Select the API created in earlier steps
  5. Select the Auth created
  6. Click submit query /dev/images/apiGroveGUI_Policy_Basic.png
  7. Attempting to access the API without supplying username and password returns a unauthorized message
  8. Accessing the API with the correct username and password returns search results from the twitter API