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

Source restructure #532

Merged
merged 6 commits into from
Oct 28, 2021
Merged

Source restructure #532

merged 6 commits into from
Oct 28, 2021

Conversation

BruceMacD
Copy link
Collaborator

@BruceMacD BruceMacD commented Oct 26, 2021

Closes: #519

Iteration for: #435

Next steps:
#518 - rename source to providers
#244 - adding the config migrator at the same time as the provider change to reduce the amount of config versions
#435 - add the provider CRUD endpoints

Changes:
Sources now have this structure:

{
    "clientID": "1234",
    "clientSecret": "infra-registry-okta/clientSecret",
    "created": 1635279117,
    "domain": "dev-0.okta.com",
    "id": "abc",
    "kind": "okta",
    "okta": {
      "apiToken": "infra-registry-okta/apiToken"
    },
    "updated": 1635279397
  }

This will allow for a repeatable structure in the future as we only support the auth code flow at this time. For example another custom IDP called some-idp may look like this:

{
    "clientID": "1234",
    "clientSecret": "some-idp/clientSecret",
    "created": 1635279117,
    "domain": "dev-0.some-idp.com",
    "id": "abc",
    "kind": "some-idp",
    "some-idp": {
      "apiToken": "some-idp/apiToken",
      "enableRegistration": true
    },
    "updated": 1635279397
  }

internal/registry/api.go Outdated Show resolved Hide resolved
internal/registry/api.go Outdated Show resolved Hide resolved
Copy link
Contributor

@jmorganca jmorganca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, after revisiting @mxyng 's comments on serialize and deserialize

@BruceMacD BruceMacD merged commit fce3b34 into main Oct 28, 2021
@BruceMacD BruceMacD deleted the source-restructure branch October 28, 2021 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants