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

Major refactor of tutorial folder structure. #70

Merged
merged 32 commits into from
Mar 19, 2021

Conversation

morrieinmaas
Copy link
Collaborator

  • In accordance with isseue 61 description on GitHub

TODOs:

  • Fix all broken links within the notebooks
  • extend notebooks to cover mediation and multitenant
  • possibly introduce helper functions that cn be imported from extra
    folder
  • !!! If medation and multitenant live in folder 1. the
    docker-compose.yaml and manage script need to be adjusted to accomodate
    for that setup. TBD what that looks like. More info
    here

Description

see issue 61

Checklist

* In accordance with isseue 61 description on GitHub

TODOs:

* Fix all broken links within the notebooks
* extend notebooks to cover mediation and multitenant
* possibly introduce helper functions that cn be imported from extra
folder
* !!! If medation and multitenant live in folder 1. the
docker-compose.yaml and manage script need to be adjusted to accomodate
for that setup. TBD what that looks like. More info
[here](https://github.com/hyperledger/aries-cloudagent-python/blob/main/Multitenancy.md#multi-tenant-admin-api)
* Created folder structure and numbering according to [issue
61](OpenMined/PyDentity#61)
* Adjusted notebook crossreferences/links accordingly in all notebooks
* Fixed some broken links to respective other notebooks in notebooks

Fixed all links for 1. Learning Aries, ACA-py and the
Basic Controller for

* Alice's Notebooks
* Checked all links manually

Fixed all links for bob in 1 Basic concepts

* All manually checked
Basics to version-bump aca-py

* Bumped aca-py version to 0.6 in Dockerfile
* add auto-provision param to aries basic args
* add auto-provision param to aries advanced args

Adjust proof controller to reflect version 0.6 API of aca-py.

* Added sending problem report function
* Tidied up th ecode to reflect Python linting
* Tidied up function definitions in order to reflect swagger docs order

Bump version of aca-py for attachment protocol example

* Change aca-py version for Docker image
* add --auto-provision flag to aca-py start so it runs properly and a
new wallet is created on startup

Changes to plugin routes to work with v0.6.0

* Connection takes now a session instead of context
* session is now a context property (context.session())
* context now comes from AdminRequestContext (new import) and is the
request["context"]
* Outbound_handler now directly takes the router from request and not
app.request
* ConnectionRecord has changed to ConnRecord (this takes the session)

Add mediation controller

* Added all async functions to cover mediation via API
* minor fixes to proofs.py, fixed naming of parsed args

Removed superfluous variable parsing in mediation.py

Make changes to remove by topic method call without the dirty changes to
the notebook like cell runs

Add reference to mediation manual/README for usage

Remove duplicate auto-provion flag from docker-compose.yml

WIP Basic startup with multitenancy enabled

* Pass args in dockercompose yaml
* bump version of aca-py for ngrok
bump aiohttp version to 3.7.2

WIP Basic notebook setup

* create an basewallet agent
* create an external agent
* create notebook structure for each of the above
** Bob and Alice have separate folders because they each hold their own subwallets and can be considered different users on the same agent
* Renaming varibales in manage and docker-compose.yml accordingly in order to reflect basewallet and ecternal agents
* create an basewallet agent
* create an external agent
* create notebook structure for each of the above
** Bob and Alice have separate folders because they each hold their own subwallets and can be considered different users on the same agent
* Renaming varibales in manage and docker-compose.yml accordingly in order to reflect basewallet and ecternal agents

Basics to version-bump aca-py

* Bumped aca-py version to 0.6 in Dockerfile
* add auto-provision param to aries basic args
* add auto-provision param to aries advanced args

Adjust proof controller to reflect version 0.6 API of aca-py.

* Added sending problem report function
* Tidied up th ecode to reflect Python linting
* Tidied up function definitions in order to reflect swagger docs order

Bump version of aca-py for attachment protocol example

* Change aca-py version for Docker image
* add --auto-provision flag to aca-py start so it runs properly and a
new wallet is created on startup

Changes to plugin routes to work with v0.6.0

* Connection takes now a session instead of context
* session is now a context property (context.session())
* context now comes from AdminRequestContext (new import) and is the
request["context"]
* Outbound_handler now directly takes the router from request and not
app.request
* ConnectionRecord has changed to ConnRecord (this takes the session)

Add mediation controller

* Added all async functions to cover mediation via API
* minor fixes to proofs.py, fixed naming of parsed args

Removed superfluous variable parsing in mediation.py

Make changes to remove by topic method call without the dirty changes to
the notebook like cell runs

Add reference to mediation manual/README for usage
@wip-abramson
Copy link
Member

Sorry to be a pain but wondering about a slight refactor of tutorial structure for the first tutorial.

Basically Proofs tutorials wont work unless they have first issued themselves a credential. So perhaps it makes sense just to condense into the Credentials folder?

I also think Out of Band tutorial is an Advanced concept not a messaging one.

Like the tutorial names though!

* Extend the AriesController class to handle multitenancy
* Update the API for multiitenancy to work properly
** Made request body optional where possible by providing a default
* Create notebooks for Alice and Bob in order to
** Create two wallets on the same agent
** Cover all API endpoints for multi tenancy

Signed-off-by: morrieinmaas <[email protected]>
@morrieinmaas
Copy link
Collaborator Author

@wip-abramson I'll refactor like that. Makes sense to me.

@@ -57,3 +57,4 @@ debug-connections: true
debug-credentials: true
debug-presentations: true
enable-undelivered-queue: true
open-mediation: true
Copy link
Member

Choose a reason for hiding this comment

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

We should specify this in the docker-compose instead

issuer: bool = True,
action_menu: bool = True,
revocations: bool = True,
api_key: str = None,
jwt_token: str = None,
Copy link
Member

Choose a reason for hiding this comment

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

can we call this subwallet_token or something like that

if revocations:
self.revocations = RevocationController(
self.admin_url,
self.client_session
)


# def update_jwt_token(self, api_key: str):
Copy link
Member

Choose a reason for hiding this comment

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

I think we should have this.
something like set_subwallet_token

morrieinmaas and others added 8 commits March 15, 2021 15:55
* Improve tutorial structure (WIP)
* Extend AriesAgentController class to have a method that updates the
JWT token
* Little more structure to Bob's tutorial Notebook. Still needs work
* Check out the examples in the Websocket notebooks in the Bob folder
** This is a minimal-ish implementation of a Websocket server instead of
http that can handle multiple client connections to solve the current
webhook port-in-use problem.
** It already demonstrates running multiple clients on the same
endpoint. Here 127.0.0.1:8090/ws.
** I reckon we can make this quite elegant by re-writing this further
and using routes like /ws/{some-unique-wallet-id}/the-webhook-handle to
send specific webhooks only to the actual recepient.
** For the previous point could even use authentication with that (not
sure that's required actually because the agent should already be only
able to connect when having the right credential?!) TODO: investigate
this point.
instantiated twice.

* Rewrite header assignment logic
* Minor changes in notebooks
* Fix mediation API request_mediation to not require passing an empty
object
* Tidy up notebooks part 1 and 2
* Checked functionality of notebooks
* Remove superfluous notebooks

TODO: Finish part 3 of the tutorial notebooks
* Still need to accept credential
* Finished up notebooks
* Changed startup logic to accomodate multitenent use and mediation
** This means passing a different env yaml file by setting a flag in
manage
@morrieinmaas morrieinmaas changed the title [WIP] Major refactor of tutorial folder structure. Major refactor of tutorial folder structure. Mar 19, 2021
@morrieinmaas
Copy link
Collaborator Author

@wip-abramson @lohanspies Please have a look. I'm happy for any feedback. Lesson learned, pulled too much into one task. that got a bit out of hand volume-wise.

@lohanspies
Copy link
Member

at got a bit out of hand volume-wise.

Agree. Let us keep it focussed on small achievable chunks.

debug-credentials: true
debug-presentations: true
enable-undelivered-queue: true
open-mediation: true
Copy link
Member

Choose a reason for hiding this comment

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

We should move this out of here

Copy link
Member

@wip-abramson wip-abramson left a comment

Choose a reason for hiding this comment

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

All looks good to me, good work

@wip-abramson wip-abramson merged commit 7ebed18 into OpenMined:master Mar 19, 2021
@TimoGlastra TimoGlastra deleted the issue_61 branch November 10, 2021 16:31
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