Improve executors and authentication services #680
ThaminduDilshan
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
Currently all executors reside in respective sub packages in the
internal/executorpackage. Some of these executors need to utilize internal services. Currently auth executors invoke individual auth services ininternal/authn/packages.These individual services need to be injected to the executors with future refactoring. Ideally these auth executors should belong to the respective auth packages.
Suggested Improvement
Rather than creating all authn services in the servicemanager level, we can follow the below approach.
In the servicemanager.go, we will Initialize the authentication service with all the needed services
And we will have a authn/init.go, we will Initialize each of these authenticaiton package which will return authenticaiton service and corresponding executor. Using that we can then create authnService and executorProvider(I am not sure whether this name) which will keep the map of executors which will be used for the flowexec
In the authn/oauth/init.go, we can Initialize each of authenticaiton service and corresponding executor as well and return both.
So with this change there won't be need for the executor package.
I like this approach because,
The directory structure will be like this:
Originally suggested by @senthalan in #673 (comment)
Beta Was this translation helpful? Give feedback.
All reactions