Integration between NEMO and FabuBlox
Project description
NEMO-fabublox-integration
Overview
The NEMO-fabublox-integration plugin provides seamless integration between NEMO and FabuBlox. This plugin enables automated synchronization of tool data from your NEMO instance to FabuBlox.
Key Features
- Automated Tool Synchronization: Synchronize tool information from NEMO to FabuBlox with customizable field selection
- Background Job Processing: Asynchronous synchronization with progress tracking and detailed status reporting
- Error Handling: Comprehensive error tracking and reporting for failed synchronization attempts
- Permission Management: Fine-grained access control for FabuBlox integration features
- Status Tracking: Keep track of which tools have been synchronized and when
Installation
Prerequisites
- NEMO instance (version compatible with the plugin)
- Python 3.9 or higher
- FabuBlox configured facility
- A secure location for storing the authentication key file
Installation Steps
-
Install the plugin using pip:
pip install nemo-fabublox-integration
-
Add the plugin to your NEMO installation by updating your
settings.py:INSTALLED_APPS = [ '...', 'NEMO_fabublox_integration', '...' ]
-
Obtain credentials from FabuBlox:
- Contact the FabuBlox team to set up your facility integration
- FabuBlox will provide you with:
- An authentication key file
- A bucket name for data synchronization
-
Configure required settings in your
settings.py:# Required: Path to the FabuBlox authentication key # This should be an absolute path to a secure location # The authentication key file will be provided by FabuBlox FABUBLOX_AUTHENTICATION_KEY_LOCATION = "/path/to/secure/directory/fabublox-auth-key.json" # Bucket name for data synchronization # This will be provided by FabuBlox along with the authentication key # If not set in settings.py, you can set it later via the detailed admin FABUBLOX_DATA_SYNC_BUCKET_NAME = "your-bucket-name"
-
Run database migrations:
python manage.py migrate
-
Restart your NEMO server to load the plugin.
-
Verify the installation by navigating to
/fabublox/in your NEMO instance (requires appropriate permissions).
Usage
Initial Configuration
After installation, you need to configure the plugin through the NEMO admin interface:
-
Access the FabuBlox Configuration Page:
- Navigate to
/fabublox/configuration/in your NEMO instance - You must have the required permissions (by default, superuser access)
- Navigate to
-
Verify Authentication Key Status:
- The configuration page will display the health status of your authentication key
- If there are any issues, they will be displayed
-
Configure Shared Tool Fields:
- Select which tool fields you want to synchronize to FabuBlox
- Available fields include:
- Name
- Description
- Category
- Location
- Primary Owner (including first name, last name, and email)
- Backup Owners (including first name, last name, and email)
- Click "Update Shared Fields" to save your selection
-
Set Permissions (Admin Interface):
- In the Django admin interface, navigate to the FabuBlox Integration Configuration
- Set the
admin_permissionfield to define which user roles/groups can access the integration - By default, only superusers can access the integration features
User Manual
Accessing FabuBlox Integration
The plugin provides several pages accessible from the NEMO interface:
- Configuration:
/fabublox/configuration/- Configure integration settings - Tools:
/fabublox/tools/- View and synchronize tools - Synchronization History:
/fabublox/synchronization/- View synchronization job history
Synchronizing Tools to FabuBlox
-
Navigate to the Tools Page:
- Go to
/fabublox/tools/in your NEMO instance - You will see a list of all tools in your NEMO instance
- Go to
-
Select Tools to Synchronize:
- Individual Tools: Check the boxes next to specific tools you want to synchronize
- All Tools: Click the "Synchronize All Tools" button to synchronize all tools
-
Start Synchronization:
- The synchronization job will start in the background
- You will be redirected to the Synchronization History page
-
Monitor Progress:
- The Synchronization History page shows all current and past synchronization jobs
- In-progress jobs display:
- Total number of tools being synchronized
- Number of successfully synchronized tools
- Number of failed tools
- Progress percentage
- Real-time status updates
- You can view detailed error messages for any failed synchronizations
-
View Synchronization Status:
- Each tool in the Tools list shows:
- Last synchronized timestamp
- User who performed the last synchronization
- Use the search functionality to filter tools by name
- Each tool in the Tools list shows:
Understanding Synchronization Jobs
- Job Lifecycle: Jobs progress through states: Pending → In Progress → Completed/Partially Completed/Failed
- Concurrent Jobs: Only one synchronization job can run at a time to prevent conflicts
- Job Timeout: Jobs that are inactive for more than the configured timeout (default: 5 minutes) are automatically marked as failed
- Automatic Cleanup: The system automatically detects and cleans up stale jobs (from server restarts, crashes, etc.)
Security: Handling the Authentication Key
The FabuBlox authentication key provided by the FabuBlox team grants access to synchronize data with your FabuBlox facility. Proper handling of this key is critical for maintaining security.
Best Practices for Key Storage
-
Secure Storage Location:
# Use a directory outside your web root FABUBLOX_AUTHENTICATION_KEY_LOCATION = "/etc/nemo/secrets/fabublox-auth-key.json" # [WRONG] NOT in your project directory FABUBLOX_AUTHENTICATION_KEY_LOCATION = "/path/to/nemo/project/fabublox-auth-key.json"
-
File Permissions:
# Set restrictive permissions (read-only for the NEMO user, 'nemo' in this example) chmod 400 /etc/nemo/secrets/fabublox-auth-key.json chown nemo:nemo /etc/nemo/secrets/fabublox-auth-key.json
-
Environment-Specific Configuration:
- Use environment variables or separate settings files for different environments
- Never commit the authentication key to version control
# Example: Using environment variables import os FABUBLOX_AUTHENTICATION_KEY_LOCATION = os.environ.get('FABUBLOX_KEY_PATH')
-
Key Rotation:
- If you suspect the key has been compromised, contact FabuBlox support immediately
- Request a new authentication key from the FabuBlox team
- Replace the key file and restart your NEMO server
- Verify the new key status in the Configuration page
CI/CD Pipeline Security
When deploying NEMO with FabuBlox integration in CI/CD pipelines, use encryption to protect the authentication key:
- Always use encrypted secrets/variables provided by your CI/CD platform
- Never print or log the authentication key contents
- Mark secrets as "masked" or "protected" in your CI/CD platform
- Limit access to secrets to specific branches or environments (e.g., production only)
- Rotate keys regularly and update your CI/CD secrets accordingly
- Use ephemeral environments when possible to minimize key exposure
For Docker deployments, use Docker secrets or mount the key file as a read-only volume:
Troubleshooting
Authentication Key Issues
Problem: "FabuBlox Authentication key is not configured"
Solutions:
- Verify
FABUBLOX_AUTHENTICATION_KEY_LOCATIONis set in yoursettings.py - Ensure the file path is absolute and points to an existing file
- Check file permissions - the NEMO process must be able to read the file
Problem: "FabuBlox Authentication key is not valid"
Solutions:
- Confirm the key was provided by FabuBlox and hasn't been manually edited
- Ensure the authentication key file has not been corrupted or truncated
- Contact FabuBlox support if the key appears valid but is still rejected
Synchronization Issues
Problem: "A synchronization job is already in progress"
Solutions:
- Wait for the current job to complete before starting a new one
- Check the Synchronization History page to monitor the current job
- If a job appears stuck, wait for the automatic timeout (default: 5 minutes)
- Check server logs for any errors that might have caused the job to hang
Problem: "Your FabuBlox integration configuration is incomplete or invalid"
Solutions:
- Go to the Configuration page to see specific issues
- Ensure
FABUBLOX_DATA_SYNC_BUCKET_NAMEis set insettings.py - Verify the authentication key is valid and properly configured
Problem: Synchronization job fails for specific tools
Solutions:
- Check the Synchronization History page for detailed error messages
- Common causes:
- Network connectivity issues to the synchronization service
- Insufficient permissions (check with FabuBlox team)
- Invalid or missing required tool data
- Tool data exceeds size limits
- Authentication key has expired or been revoked
- Review the detailed failure information in the job history
- Contact FabuBlox support if errors persist
Permission Issues
Problem: Cannot access /fabublox/ URLs (403 Forbidden or redirect to login)
Solutions:
- Verify you're logged in to NEMO
- Check that you have the required permissions:
- By default, only superusers can access the integration
- Admin can configure different permissions in Django admin under "FabuBlox Integration Configuration"
- Contact your NEMO administrator if you need access
Support
For issues, questions, or feature requests:
- Bug Reports: Please file an issue in the project repository
- FabuBlox Support: Contact FabuBlox support for authentication issues or configuration
- NEMO Support: Consult the NEMO documentation for general NEMO questions
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! Please follow the coding style (Black) and ensure all tests pass before submitting pull requests.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nemo_fabublox_integration-1.0.1.tar.gz.
File metadata
- Download URL: nemo_fabublox_integration-1.0.1.tar.gz
- Upload date:
- Size: 26.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d969c11501d957a2548e36581ef71e2986d1f66ab857071965c3f48c86f9165
|
|
| MD5 |
e880d12ec51cd5ddfd8cabe8516362f6
|
|
| BLAKE2b-256 |
3176da401a259e849a7f3ee22c4c4848a98132cbfe3bfd47d9d7010a74212d6a
|
File details
Details for the file nemo_fabublox_integration-1.0.1-py3-none-any.whl.
File metadata
- Download URL: nemo_fabublox_integration-1.0.1-py3-none-any.whl
- Upload date:
- Size: 34.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c90c97de739058bef83301152c8e0a087c8c2437ef98d15328873d7187141458
|
|
| MD5 |
40945d94424c2693b53eca20fbf58161
|
|
| BLAKE2b-256 |
cdf0da7c6e6fecd00668d7a181e0bda47f997d4a5cd60da5194bcc95728c2e8f
|