Skip to content

[OFREP] Implement support for OFREP Server SDK configuration using environment variables #1421

@askpt

Description

@askpt

Overview

Implement support for OFREP SDK configuration using environment variables in the SDK.

Goal

Enable users of the OFREP to configure the client using standardized environment variables, improving flexibility and consistency across OpenFeature Protocol implementations.

Scope

Environment Variables to Support

The following environment variables should be implemented:

  • OFREP_ENDPOINT - The OFREP server endpoint (e.g., http://localhost:2321)
  • OFREP_HEADERS - Custom headers in comma-separated format (e.g., "Authentication=Bearer 123,Content-Type=json")
  • OFREP_TIMEOUT - Request timeout in milliseconds (e.g., 5000)

Implementation Tasks

  • Add support for reading OFREP_ENDPOINT environment variable
  • Add support for reading OFREP_HEADERS environment variable with proper parsing
  • Add support for reading OFREP_TIMEOUT environment variable
  • Ensure programmatic configuration takes precedence over environment variables
  • Add validation and error handling for invalid environment variable values
  • Update SDK documentation with environment variable usage examples
  • Add tests for environment variable configuration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions