Skip to content
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.

WIP: "Become an Anchor" guide redux #160

Merged
merged 33 commits into from
Oct 7, 2016
Merged

WIP: "Become an Anchor" guide redux #160

merged 33 commits into from
Oct 7, 2016

Conversation

Mr0grog
Copy link
Contributor

@Mr0grog Mr0grog commented Aug 27, 2016

This isn’t even sort of done yet, but I want to get it in public so @jedmccaleb / @bartekn / @nullstyle can take a basic look at whether I'm doing things right with the various prebuilt servers and @mozzadrella can start to gut-check me on direction.

Unlike the old guide, this:

  • Covers topics of federation and compliance
  • Uses the pre-built federation server, compliance server, and bridge server
  • Has diagrams :)

Covers topics of federation and compliance, uses the pre-built federation server, compliance server, and bridge server to do so.
@jedmccaleb
Copy link
Contributor

For these diagrams, can we change it to "Your FI" instead of "Your Bank" or "Your Financial Institution" or maybe just "Your Infrastructure"

@Mr0grog
Copy link
Contributor Author

Mr0grog commented Aug 31, 2016

@jedmccaleb, yeah, definitely. The diagrams may need some general revision anyway; I was trying to get a) a condensed version of the bigger diagram so you could actually see it all at once and b) show how it works with/without various addons like federation and compliance.

Probably not "FI" (I think that abbreviation is problematic; it seemed to be when I asked people about the old doc, which also used it). Will have to think about whether "financial institution" or "infrastructure" is better.

@Mr0grog
Copy link
Contributor Author

Mr0grog commented Aug 31, 2016

Also, organizationally: do we want/need a better structure for where images go, filesystem-wise?

@jedmccaleb
Copy link
Contributor

you mean like docs/images or something?
I think I like "infrastructure" best. If they are considering doing this then they know they are a financial institution.

@bartekn
Copy link
Contributor

bartekn commented Aug 31, 2016

When it comes to diagrams I'd add a background layer for Your/Other FI. Right now, it's not clear where each part of the system belongs.

@Mr0grog
Copy link
Contributor Author

Mr0grog commented Aug 31, 2016

you mean like docs/images or something?

Yeah. Is it ok that the images are just free-floating in the guides directory right now, or should they be grouped into a directory? (probably with the same name as the guide)

Relatedly, I can put the sketch files in dropbox, but should they also live in the repo? Seems like that would make sense.

I think I like "infrastructure" best.

What about “your systems?” (“infrastructure” is good, too, just slightly more jargon-y.)

When it comes to diagrams I'd add a background layer for Your/Other FI.

Yeah, that's probably a good idea.

@jedmccaleb
Copy link
Contributor

Seems better to have the images in a separate dir but I don't feel strongly about it. Also don't feel strongly about sketch in the repo or not. Probably better to have it be here.
"your systems" is ok seems less clear than "infrastructure" though.

Get rid of nice indentations (bad for copy/paste), add `source` (it's required for now), add `apiKey`).
May want to consider removing all the API key bits since not really recommended anyway.
@Mr0grog
Copy link
Contributor Author

Mr0grog commented Sep 15, 2016

Ok, basic first draft of all the parts, fully working. Needs cleanup:

  • This is way too long. Needs to be split up into
    1. Architecture/overview
    2. Bridge
    3. Federation
    4. Compliance
    5. Next steps.
  • Intro should be beefed up with a full diagram and overview of how the parts fit together. I originally wanted to introduce things step-by-step, but in hindsight, I think I need to give a better big picture overview first, especially now that it has gotten so long.
  • Diagram cleanup (maybe w/ help from Romina)
  • Need some explanation around domains, SSL, and how to get it running locally-ish. @nullstyle do you think your non-SSL mode support will land soon-ish? Should I just write the guide pretending they can do that in a test situation?
  • Need to clean up language/details around database stuff. In the current release, only MySQL (or MariaDB) works, but I know you’re fixing Postgres, @nullstyle. Should I assume that will ship before this guide and just write it as if that works?
  • Need Java examples (and some JS ones are missing, too)
  • Integration testing:
    • I had been trying to avoid telling people to just send a payment to themselves (e.g. from amy*your-org.com to bob*your-org.com), but I guess that actually works and does exercise the full flow. Should I just do that? Otherwise…
    • It might be useful or helpful to ship a dummy server that does federation & compliance for any address, so you can send a payment through your bridge + compliance setup to it. Otherwise, it seems a little rough to say “just duplicate your whole infrastructure so you have something to transact against” :\
    • UPDATE: I went with suggesting that people send a payment to themselves so this didn’t seem obscenely complicated to a reader. (4da981b)
  • Next steps: what else should be there besides the security doc and running core? Channels? /@jedmccaleb @bartekn @nullstyle

@jedmccaleb
Copy link
Contributor

jedmccaleb commented Sep 15, 2016

Looks great. are things like "[^friendly_names]" placeholders?
nm I see they are foot notes. Do these work in the dev portal?

@@ -354,7 +354,7 @@ You should get a response like:

## Compliance

The final piece of the puzzle is handling regulatory compliance, like <abbr title="Know Your Customer">KYC</abbr>. The [Stellar compliance protocol](compliance-protocol.md) is a standard way to exchange compliance information and pre-approve a transaction with another financial institution.
The final piece of the puzzle is handling regulatory compliance, like <abbr title="Anti-Money Laundering">AML</abbr>. The [Stellar compliance protocol](compliance-protocol.md) is a standard way to exchange compliance information and pre-approve a transaction with another financial institution.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jedmccaleb what exactly is the right context for AML vs. KYC?

Copy link
Contributor

Choose a reason for hiding this comment

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

KYC is a more thorough process that a bank will go through when someone is creating a bank account with them. When they are sending a payment they just need enough info on the recipient to do the AML check to make sure the recipient isn't on some sanction list. Since people already have accounts in these scenarios, we are just dealing with AML.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, gotcha. I had thought KYC referred to exchanging the information as well, not just initially gathering it. Will keep that in mind!

@Mr0grog
Copy link
Contributor Author

Mr0grog commented Sep 15, 2016

are things like "[^friendly_names]" placeholders?

Those are named footnote links. So you can footnotes like [^1] or like [^topic_here]. I like the latter more since you don’t have to re-number everything if you insert a new one higher up in the document (they also provide a little clue about the subject of the note).

@Mr0grog
Copy link
Contributor Author

Mr0grog commented Sep 15, 2016

The above splits the anchor guide into a 5 page group, kind of like the get started guide. I also added support in the build scripts for metadata named section in the frontmatter as seen here: f2cc40d#diff-d90ab5683bfaab7c60803d1fd7dcd389R3 that automatically builds the previous/next links like the ones on the get started guide.

Not sure if that’s desirable (it kind of obscures the links when reading straight markdown or in github). Any thoughts on it?

Mr0grog and others added 3 commits September 15, 2016 16:55
@bartekn if you have a nicer way to write out the Java stuff, that'd be awesome. I'm not really sure what helper libraries are most used for HTTP stuff these days.
@bartekn
Copy link
Contributor

bartekn commented Sep 16, 2016

Rewrote Java examples as requested in 0689e88.

- Hooks -> Callbacks
- Stop discussing error callback since it never gets used
- Don't discuss api_key since we've decided its use shouldn't be encouraged
- Minor formatting and language tweaks
This helps clarify to the reader exactly which file is being shown, since they can see the name in the heading of the code snippet.
This also makes some technical corrections to the diagrams (and adds one for federation). Diagrams still need final cleanup from Romina.
@Mr0grog
Copy link
Contributor Author

Mr0grog commented Sep 30, 2016

Ok, I think this is mostly done save for:

  • A last pass of work on improving the diagrams
    • Have talked with Romina about getting some input on improving the appearance and clarifying the arrangement and ordering of things.
    • Make sure they are appropriately sized, compressed, maybe multiple versions (SVG and PNG)
  • Need sidebar support in developers repo
  • Need next/back links (going to see about autogenerating these in developers repo)

But otherwise, I think this is pretty much there, excepting any further feedback anyone’s got. Please let me and Romina both know if you think there are technical inaccuracies in the diagrams, too. /cc @jedmccaleb @nullstyle @bartekn

@Mr0grog
Copy link
Contributor Author

Mr0grog commented Sep 30, 2016

Side note about autogenerating back/next links: just realized this might not actually be desirable given that we want these to be reasonably browsable on Github. Thoughts? (Update: have added the links to the docs instead of autogenerating)

Also! This references the security guide (#149) in the next steps section. That PR isn’t ready to land yet, so we either need to finish it (it’s waiting for feedback from other people) or pull it from next steps here. (Update: security guide has since landed.)

Headings that used to be H3 should have become H2 when we broke this guide into 5 pages (what used to be level 2 headings are now level 1 page headings).
Mr0grog added a commit to stellar-deprecated/developers that referenced this pull request Sep 30, 2016
Don't merge into master until stellar-deprecated/docs#160 is shipping.
Copy link
Contributor

@bartekn bartekn left a comment

Choose a reason for hiding this comment

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

Looks great! 👍

`AUTH_SERVER` is the address for the *external* port of your compliance server. Like your federation server, this can be any URL you like, but **it must support HTTPS and use a valid SSL certificate.**[^ssl]

`SIGNING_KEY` is the public key that matches the secret seed specified for `signing_seed` in your compliance server’s configuration. Other organizations will use it to safely encrypt sensitive compliance data (like customer names, birthdates, and addresses) so that only you can read it and to verify that messages were actually sent by you.

Copy link
Contributor

Choose a reason for hiding this comment

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

SIGNING_KEY is used to sign Auth Request (sig param) so receiving organization can check whether it was really sent by the sender organization.
There will be also ENCRYPTION_KEY in stellar.toml file but we haven't decided on the format yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bartekn Ah! I admit to not having inspected data on the wire to see if this was additionally used for encryption. D’oh! How about:

SIGNING_KEY is the public key that matches the secret seed specified for signing_seed in your compliance server’s configuration. Other organizations will use it to verify that messages were actually sent by you.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

✅ DONE!

This ensures we have working back and next links when browsing the docs on Github (I had previously been planning on autogenerating these links when the developers site builds).
@Mr0grog
Copy link
Contributor Author

Mr0grog commented Oct 6, 2016

Added the back/next links to the docs. Needs stellar-deprecated/developers#84 for nicer styling.

That just leaves improved diagrams from Romina, I think.

@jedmccaleb
Copy link
Contributor

Nice work Rob!

@jedmccaleb jedmccaleb merged commit 8e27aae into master Oct 7, 2016
@jedmccaleb jedmccaleb deleted the new-anchor-guide branch October 6, 2017 16:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants