Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Security Test Script

This repository provides a Python test script for verifying access permissions (admin, write, read) against a FIWARE Context Broker secured with Keycloak authentication. The script tests entity creation, reading, deletion, and subscription notification handling for different tenants and roles.

Features

  • Tests write, read, and delete permissions for each tenant
  • Validates subscription notification delivery

Configuration

  1. Install dependencies:

    • Install required packages using pip:
      pip install -r requirements.txt
      
  2. Create config.json:

    • In the project root, create a file named config.json with the following structure:
      {
        "client_id": "<your_client_id>",
        "client_secret": "<your_client_secret>",
        "username": "<your_username>",
        "password": "<your_password>"
      }
    • Replace the values with your Keycloak client credentials and user login.

Test Tenants

Tenant Role Description
securitytest1 admin Full access: create, read, delete
securitytest2 write Write and read access only
securitytest3 read Read-only access

Usage

Run the test script with:

python main.py

The script will output the results of each permission test for all configured tenants.

About

Test script for security check

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages