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

Feature/grpc auth #44

Merged
merged 1 commit into from
May 19, 2021
Merged

Feature/grpc auth #44

merged 1 commit into from
May 19, 2021

Conversation

jcbalmeida
Copy link
Contributor

@jcbalmeida jcbalmeida commented May 19, 2021

Enables to run grpc server with optional SSL credentials.

This PR is a copy of Bothub own implementation: https://github.com/Ilhasoft/bothub-engine/blob/develop/bothub/common/management/commands/grpc.py
There is too a PR to django-grpc-framework that enables that feature (fengsp/django-grpc-framework#13). If it is accepted, this command can be discontinued.

@jcbalmeida jcbalmeida changed the base branch from master to develop May 19, 2021 15:16
@jcbalmeida jcbalmeida merged commit 275848a into develop May 19, 2021
jcbalmeida pushed a commit that referenced this pull request Jun 1, 2021
feat: Classifier create gRPC

feat: Added UpdateUserLang

feat: Template selector by domain

feat: Changes in template context processor:

  - Name changed to enable_weni_layout (more explicit)
  - Uses regex to extract the url domain
  - Check the current domain againt settings.WENI_DOMAINS

  Co-authored-by: paulobernardo <[email protected]>

feat: Set User admin in org on create

feat: Adds endpoints to flow editor and org settings, changing current org (#40)

  * Creates weni.auth.org_choose decorator

  * Changes url pattern to /weni/<org_uuid>/authenticate;

  * Refactors WeniAuthenticationRequestView to use weni.auth.decorators.org_choose;
  * Implements weni.auth.views.OrgHomeRedirectView (redirects to temba's "/org/home" view, setting the org in the url /weni/<org_uuid>)

  * Adds weni.auth.views.FlowEditorRedirectView

feat: new Weni's context processors

feat: Added classifier create

feat: User email and Org UUID custom fields

feat: Added access_token to create and list classifier (#43)

feat: Adds custom command to run grpc server with optional SSL credentials (#44)
@jcbalmeida jcbalmeida mentioned this pull request Jun 1, 2021
jcbalmeida added a commit that referenced this pull request Jun 1, 2021
* feat: Added UpdateUserLang

* Initial implementation of template selector by domain

* Changes in template context processor:

- Name changed to enable_weni_layout (more explicit)
- Uses regex to extract the url domain
- Check the current domain againt settings.WENI_DOMAINS

Co-authored-by: paulobernardo <[email protected]>

* feat: Added classifier list gRPC

* wip: Classifier create gRPC

* Fixes domain selection in context processor

* Adds org_choose view

* Adds org_choose view to weni.auth.urls

* Code formatting

* fix: Ajusts on language Update service

* Replaces org_choose view with WeniAuthenticationRequestView (extended from OIDCAuthenticationRequestView)

* Renames "/weni/org_choose/" url to "/weni/authenticate/"

* Code formatting

* Fixes context processor

* Updates grpc stubs

* Fixes /weni/authenticate/ url

* Fixes org gRPC requests to use uuid intead ID

* Fixes BillingServiceTest.setUp()

* fix: Ajusted org params in user app

* fix: Changed user_id to user_email

* Fix /weni/authenticate/<org> url

* feat: Set User admin in org on create

* Fixes weni-org-choose url path

* test: Added tests of update language from user (#34)

* Calls org.initialize() on OrgService.Create() (#39)

* Adds endpoints to flow editor and org settings, changing current org (#40)

* Creates weni.auth.org_choose decorator

* Changes url pattern to /weni/<org_uuid>/authenticate;

* Refactors WeniAuthenticationRequestView to use weni.auth.decorators.org_choose;
* Implements weni.auth.views.OrgHomeRedirectView (redirects to temba's "/org/home" view, setting the org in the url /weni/<org_uuid>)

* Adds weni.auth.views.FlowEditorRedirectView

* feat: new Weni's context processors

* fix: weni.utils.app_config.update_urlpatterns now works properly with function-based views and URLResolvers

* feat: Added classifier create

* fix: Updated protobuffers

* fix: Removed sync=False from serializer

* fix: Adjusted SerializerUtils method name

* fix: Adjusted method params

* feat: User email and Org UUID custom fields

* feat: Added access_token to create and list classifier (#43)

* Adds custom command to run grpc server with optional SSL credentials (#44)

* fix: Adjusted username on org create endpoint (#45)

* Adds __init__.py into grpc command (#46)

* fix: On retrieve/update get or create a new user (#47)

* fix: Adjusted query of flows list (#49)

* fix: Added is_archived and is_system filters to flow count (#48)

Co-authored-by: Sandro-Meireles <[email protected]>
Co-authored-by: paulobernardo <[email protected]>
Co-authored-by: Matheus Soares <[email protected]>
Co-authored-by: Sandro Meireles <[email protected]>
jcbalmeida added a commit that referenced this pull request Jun 2, 2021
* feat: Added UpdateUserLang

* Initial implementation of template selector by domain

* Changes in template context processor:

- Name changed to enable_weni_layout (more explicit)
- Uses regex to extract the url domain
- Check the current domain againt settings.WENI_DOMAINS

Co-authored-by: paulobernardo <[email protected]>

* feat: Added classifier list gRPC

* wip: Classifier create gRPC

* Fixes domain selection in context processor

* Adds org_choose view

* Adds org_choose view to weni.auth.urls

* Code formatting

* fix: Ajusts on language Update service

* Replaces org_choose view with WeniAuthenticationRequestView (extended from OIDCAuthenticationRequestView)

* Renames "/weni/org_choose/" url to "/weni/authenticate/"

* Code formatting

* Fixes context processor

* Updates grpc stubs

* Fixes /weni/authenticate/ url

* Fixes org gRPC requests to use uuid intead ID

* Fixes BillingServiceTest.setUp()

* fix: Ajusted org params in user app

* fix: Changed user_id to user_email

* Fix /weni/authenticate/<org> url

* feat: Set User admin in org on create

* Fixes weni-org-choose url path

* test: Added tests of update language from user (#34)

* Calls org.initialize() on OrgService.Create() (#39)

* Adds endpoints to flow editor and org settings, changing current org (#40)

* Creates weni.auth.org_choose decorator

* Changes url pattern to /weni/<org_uuid>/authenticate;

* Refactors WeniAuthenticationRequestView to use weni.auth.decorators.org_choose;
* Implements weni.auth.views.OrgHomeRedirectView (redirects to temba's "/org/home" view, setting the org in the url /weni/<org_uuid>)

* Adds weni.auth.views.FlowEditorRedirectView

* feat: new Weni's context processors

* fix: weni.utils.app_config.update_urlpatterns now works properly with function-based views and URLResolvers

* feat: Added classifier create

* fix: Updated protobuffers

* fix: Removed sync=False from serializer

* fix: Adjusted SerializerUtils method name

* fix: Adjusted method params

* feat: User email and Org UUID custom fields

* feat: Added access_token to create and list classifier (#43)

* Adds custom command to run grpc server with optional SSL credentials (#44)

* fix: Adjusted username on org create endpoint (#45)

* Adds __init__.py into grpc command (#46)

* fix: On retrieve/update get or create a new user (#47)

* fix: Adjusted query of flows list (#49)

* fix: Added is_archived and is_system filters to flow count (#48)

* Create template message (#50)

* wip: Endpoint create template message

* feat: Added external_id generator and ajusted syntax

* feat: Added permissions validation

Co-authored-by: Sandro-Meireles <[email protected]>
Co-authored-by: paulobernardo <[email protected]>
Co-authored-by: Matheus Soares <[email protected]>
Co-authored-by: Sandro Meireles <[email protected]>
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.

2 participants