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

not all channels configuraiton implmented in the sdk #469

Open
AdamRussak opened this issue Jun 23, 2024 · 17 comments
Open

not all channels configuraiton implmented in the sdk #469

AdamRussak opened this issue Jun 23, 2024 · 17 comments
Labels
bug Something isn't working stale Triaged

Comments

@AdamRussak
Copy link

Describe the bug?

there is no Conig implementation in InlineHookChannel struct the okta v4 sdk

What is expected to happen?

when createing an inline hook you should be able to create a InlineHookChannel with channel config:
github.com/okta/okta-sdk-golang/[email protected]/okta/model_inline_hook_channel_config.go

but this struct is not used by any function

What is the actual behavior?

you cannot create an inline hook using any other than the basic configuration github.com/okta/okta-sdk-golang/[email protected]/okta/api_inline_hook.go

Reproduction Steps?

try to create an inline hook with this body:

{
    "name": "OIDC/OAuth token inline hook",
    "type": "com.okta.oauth2.tokens.transform",
    "version": "1.0.0",
    "channel": {
        "type": "HTTP",
        "version": "1.0.0",
        "config": {
            "uri": "https://example.com",
            "headers": [
            	{
					"key": "x-any-key",
					"value": "my-header-value"
				}
            ],
            "method": "POST",
            "authScheme": {
                "type": "HEADER",
                "key": "Authorization",
                "value": "my-shared-secret"
            }
        }
    }
}

as provided in the example in the okta offical docs.

Additional Information?

example (not working)

	body := getInlinehookBody(cr.Spec.ForProvider)
OktaCli.InlineHookAPI.CreateInlineHook(ctx).InlineHook(*body).Execute()

body creation:

func getInlinehookBody(spec *inlinehookv1alpha1.InlinehookParameters) *okta.InlineHook {
	inlinbody := okta.NewInlineHook()
	inlinbody.SetName(*spec.Name)
	// inlinbody.SetStatus(*spec.Status)
	channelBody := getChannelBody(spec.Channel)
	inlinbody.SetChannel(*channelBody)
	inlinbody.SetType(*spec.Type)
	inlinbody.SetVersion(*spec.Version)

	return inlinbody
}
func getChannelBody(spec *inlinehookv1alpha1.InlineHookChannel) *okta.InlineHookChannel {
	newChannel := okta.NewInlineHookChannel()
	if !helpers.IsZero(spec.Config) {
		configParam := helpers.StructToMap(spec.Config)
		newChannel.AdditionalProperties["Config"] = configParam
	}
	newChannel.SetType(*spec.Type)
	newChannel.SetVersion(*spec.Version)
	return newChannel
}

Golang Version

go version go1.22.4 darwin/amd64

SDK Version

4.1.2

OS version

Darwin ilnesahprib48cb 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:09:52 PDT 2024; root:xnu-10063.121.3~5/RELEASE_X86_64 x86_64

@AdamRussak AdamRussak added the bug Something isn't working label Jun 23, 2024
@duytiennguyen-okta
Copy link
Contributor

OKTA internal reference https://oktainc.atlassian.net/browse/OKTA-742339

@AdamRussak
Copy link
Author

OKTA internal reference https://oktainc.atlassian.net/browse/OKTA-742339

I don't have access to the jira

@AdamRussak
Copy link
Author

OKTA internal reference https://oktainc.atlassian.net/browse/OKTA-742339

how can i see the ticket?

Copy link

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.

@github-actions github-actions bot added the stale label Jul 17, 2024
@AdamRussak
Copy link
Author

Not stale

@github-actions github-actions bot removed the stale label Jul 18, 2024
@AdamRussak
Copy link
Author

still Not stale

Copy link

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.

@github-actions github-actions bot added the stale label Aug 12, 2024
@AdamRussak
Copy link
Author

not stale

@github-actions github-actions bot removed the stale label Aug 13, 2024
Copy link

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.

@github-actions github-actions bot added the stale label Aug 27, 2024
@AdamRussak
Copy link
Author

Not stale

@github-actions github-actions bot removed the stale label Sep 7, 2024
Copy link

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.

@github-actions github-actions bot added the stale label Sep 21, 2024
@AdamRussak
Copy link
Author

Pls fix it 😀

@github-actions github-actions bot removed the stale label Sep 22, 2024
Copy link

github-actions bot commented Oct 6, 2024

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.

@github-actions github-actions bot added the stale label Oct 6, 2024
@AdamRussak
Copy link
Author

pls fix it

@github-actions github-actions bot removed the stale label Oct 7, 2024
Copy link

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.

Copy link

github-actions bot commented Nov 5, 2024

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.

Copy link

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.

@github-actions github-actions bot added the stale label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale Triaged
Projects
None yet
Development

No branches or pull requests

2 participants