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

Add auth package #5

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft

Add auth package #5

wants to merge 10 commits into from

Conversation

lthibault
Copy link
Contributor

WIP. I'm setting up the backbone for our auth system. Objective is to have a login message flow, that applies a trivial policy (allow all).

At a high level, auth works by bundling the guest process' (stdout, stdin) into something called a "socket", and exporting a Terminal client over a Cap'n Proto RPC connection. The present PR stops short of this full implementation, and only provides the auth package.

Follow-up work:

  • Add server-side capability server
  • Add example client that connects to the sever via stdout+stderr, and performs an auth flow

@lthibault lthibault added the enhancement New feature or request label Sep 13, 2024
@lthibault lthibault requested a review from mikelsr September 13, 2024 23:51
@lthibault lthibault self-assigned this Sep 13, 2024
@lthibault lthibault marked this pull request as draft September 13, 2024 23:51
@lthibault
Copy link
Contributor Author

lthibault commented Sep 13, 2024

@mikelsr I think I'm finally starting to pick up speed. Marking as draft until I get passing tests. Expect PRs relating to CI.

Would love to get your early feedback :)

"github.com/libp2p/go-libp2p/core/crypto"
)

var _ Policy = (*Terminal_login_Results)(nil)
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the unamed variable used for?

// with name "libp2p-peer-record".
var AuthDomain_PayloadType = []byte{0xbb, 0xbb} // TODO: pick better numbers

var _ record.Record = (*expect)(nil)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see the global unamed variable pattern in more than one file, what is it for? 👀

ww_test.go Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it make sense to remove the file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants