Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to Harness Client API #7

Open
vody opened this issue May 10, 2023 · 1 comment
Open

Move to Harness Client API #7

vody opened this issue May 10, 2023 · 1 comment
Labels
💡 ideas generic ideas & opportunities wontfix

Comments

@vody
Copy link
Collaborator

vody commented May 10, 2023

Harness provides proxy service endpoints (https://config.ff.harness.io/api/1.0 and https://events.ff.harness.io/api/1.0) designed to be used by client SDK's. These endpins are way faster and provide the ability to report back feature usage information back to Harness.

Authentication

POST https://config.ff.harness.io/api/1.0/client/auth
Content-Type: application/json

{
    "apiKey": "{{APIKey}}",
    "target": {
        "identifier": "{{Target}}",
        "name": "Anonymous User",
        "anonymous": true,
        "attributes": {}
    }
}

Fetch Flags

GET https://config.ff.harness.io/api/1.0/client/env/{{Environment}}/target/{{Target}}/evaluations?cluster={{ClusterIdentifier}}
Authorization: Bearer {{Authentication.response.body.authToken}}

Post Metrics

POST https://events.ff.harness.io/api/1.0/metrics/{{Environment}}?cluster={{ClusterIdentifier}}
Content-Type: application/json
Authorization: Bearer {{Authenticate.response.body.authToken}}

{
    "metricsData": [
        {
            "timestamp": 1683682952998,
            "count":1,
            "metricsType":"FFMETRICS",
            "attributes": [
                { "key":"featureIdentifier", "value":"{{Flag}}" },
                { "key":"variationIdentifier", "value":"{{Identifier}}" },
                { "key":"target", "value":"{{Target}}" }
            ]
        }
    ]
}

To progress on this we need to be able to parse JWT token in BC. There are already dotnet available but need a proper AL wrapper.
Client Add-in will not be an acceptable option as it makes the overall solution too complex to enable Harness publisher. Option with external parser is not acceptable as well as non of the partners want's their access key to be exposed to third party service.

@vody vody added the 💡 ideas generic ideas & opportunities label May 10, 2023
@stale
Copy link

stale bot commented Jul 14, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 ideas generic ideas & opportunities wontfix
Projects
None yet
Development

No branches or pull requests

1 participant