Reference

API Secrets Management

Complete guide for creating, managing, and maintaining API Secret records in NetSuite for Licentra integration.

See More: Licentra Wiki – Modules


What Are API Secrets?

API Secrets are NetSuite's secure storage mechanism for sensitive credentials. For Licentra integration, they store your License Secret - the confidential authentication token that enables secure communication between NetSuite and the Licentra platform.


API Secret Overview

Purpose

  • Secure storage of License Secret credentials
  • Script access for Licentra bundle functionality
  • Authentication between NetSuite and Licentra servers
  • Credential management for ongoing operations

Security Features

  • Encrypted storage within NetSuite
  • Access control through script permissions
  • Audit logging of access attempts
  • Secure transmission via HTTPS

Creating Your First API Secret

Step 1: Access API Secrets

  1. Navigate to: Setup > Company > API Secrets
  2. Click "Create New" to create a new API Secret record

Step 2: Configure Secret Details

FieldValueDescription
NameLicentra Integration SecretDescriptive name for identification
IDlicentra_api_secretInternal identifier (used in Config record)
PasswordYour License SecretThe actual credential from Licentra portal
DescriptionAPI Secret for Licentra License Manager IntegrationOptional context information
RestrictionsCheck "Allow for all Scripts"Required for Licentra functionality

Step 3: Save and Document

  1. Click "Save" to create the secret
  2. Note the ID you assigned (you'll need it for configuration)
  3. Store the ID securely for future reference

Managing Multiple Secrets

Environment-Specific Secrets

For organizations with multiple environments:

Code
# Production Environment Name: Licentra Production Secret ID: licentra_prod_secret Password: [Production License Secret] # Development Environment Name: Licentra Development Secret ID: licentra_dev_secret Password: [Development License Secret] # Testing Environment Name: Licentra Testing Secret ID: licentra_test_secret Password: [Testing License Secret]

Naming Conventions

Recommended naming pattern:

Code
licentra_[environment]_secret

Examples:

  • licentra_prod_secret - Production environment
  • licentra_dev_secret - Development environment
  • licentra_sandbox_secret - Sandbox environment
  • licentra_test_secret - Testing environment

Updating API Secrets

When to Update

  • License Secret rotation - Security best practice
  • Environment changes - Switching between environments
  • Credential expiration - When secrets expire
  • Security incidents - Compromised credentials

Update Process

  1. Create new API Secret with updated credentials
  2. Update Licentra Config record to reference new secret ID
  3. Test configuration using License Viewer
  4. Delete old secret (optional, for cleanup)

Zero-Downtime Updates

For production environments:

  1. Create new secret alongside existing one
  2. Update configuration to use new secret
  3. Verify functionality with new secret
  4. Remove old secret after confirmation

Security Best Practices

Secret Management

  • Unique secrets per environment - Never reuse across environments
  • Regular rotation - Update secrets periodically
  • Secure storage - Never share secrets outside NetSuite
  • Access logging - Monitor who accesses secrets

Naming and Documentation

  • Descriptive names - Make secrets easy to identify
  • Environment tags - Include environment in name
  • Documentation - Record purpose and creation date
  • Contact information - Note who to contact for issues

Access Control

  • Minimal access - Only grant access to necessary users
  • Role-based permissions - Use NetSuite roles for access control
  • Regular audits - Review access permissions periodically
  • Emergency procedures - Plan for credential compromise

Troubleshooting API Secrets

Common Issues

IssueSymptomsSolution
Secret not foundConfiguration errorVerify secret ID exists
Access deniedPermission errorCheck "Allow for all Scripts"
Invalid credentialsAuthentication failureVerify License Secret value
Expired secretConnection timeoutUpdate with new credentials

Diagnostic Steps

  1. Verify secret exists in API Secrets list
  2. Check secret ID matches configuration
  3. Confirm "Allow for all Scripts" is checked
  4. Validate License Secret value is correct
  5. Test connection using License Viewer

Error Messages

"Secret not found"

  • Check secret ID spelling
  • Verify secret exists in API Secrets
  • Confirm secret hasn't been deleted

"Access denied"

  • Check "Allow for all Scripts" setting
  • Verify user has API Secrets access
  • Confirm NetSuite permissions

"Invalid credentials"

  • Verify License Secret is copied correctly
  • Check for extra spaces or characters
  • Confirm secret is for correct environment

Secret Lifecycle Management

Creation Phase

  1. Plan naming convention for your organization
  2. Gather credentials from Licentra portal
  3. Create secret with proper configuration
  4. Document details for future reference
  5. Test configuration immediately

Maintenance Phase

  1. Monitor usage and access patterns
  2. Regular security reviews of access permissions
  3. Update documentation as needed
  4. Plan rotation schedule for credentials

Retirement Phase

  1. Create replacement secret before removing old one
  2. Update configurations to use new secret
  3. Verify functionality with new secret
  4. Remove old secret after confirmation
  5. Update documentation to reflect changes

Advanced Configuration

Multiple Configurations

For complex environments with multiple NetSuite instances:

Code
# Instance 1 - Production Config Record: Licentra Production Config Secret Record: licentra_prod_secret Environment: Production # Instance 2 - Development Config Record: Licentra Development Config Secret Record: licentra_dev_secret Environment: Development # Instance 3 - Testing Config Record: Licentra Testing Config Secret Record: licentra_test_secret Environment: Testing

Secret Versioning

Track secret versions for audit purposes:

Code
# Version 1 Name: Licentra Production Secret v1 ID: licentra_prod_secret_v1 Created: 2024-01-15 # Version 2 Name: Licentra Production Secret v2 ID: licentra_prod_secret_v2 Created: 2024-04-15

Getting Help

When to Contact Support

  • Secret creation issues - Technical problems with NetSuite
  • Credential problems - Issues with Licentra credentials
  • Access permission errors - NetSuite permission issues
  • Configuration problems - Integration setup issues

Information to Provide

When contacting support, provide:

  • Secret ID (without the actual secret value)
  • Error messages from License Viewer
  • NetSuite environment (production, sandbox, etc.)
  • Steps taken to resolve the issue
  • Screenshots of error messages (if applicable)

Contact Information

  • NetSuite Support: For NetSuite-specific issues
  • Licentra Administrator: For credential and access issues
  • BringIT Support: For integration and technical issues


Last modified on