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

Move OAuth code->token routines from SessionSrv to Builder-API #616

Merged
merged 1 commit into from
Jun 2, 2016

Conversation

reset
Copy link
Collaborator

@reset reset commented Jun 2, 2016

This change will move external user identification to the gateway service (Builder-API) from the session service (SessionSrv). We need to move external authentication here to know a) which SessionSrv to route messages to when we don't currently have a token and, b) to help with rate limiting authentication messages in case of an attack.

  • Add ExpiringSet to dbcache crate. This is identical to the BasicSet except entities will
    expire from the set after an expiration time defined by a static trait function
  • IndexSet can now set the type of Key along with the type of the Value it stores at that key
  • Add GitHub -> Account directory lookup index to SessionSrv. This is used to map external IDs
    to our internal ID format
  • Fixes routing of SessionCreate messages. All messages will be routed by their external ID

Signed-off-by: Jamie Winsor [email protected]

* Add `ExpiringSet` to dbcache crate. This is identical to the `BasicSet` except entities will
  expire from the set after an expiration time defined by a static trait function
* `IndexSet` can now set the type of Key along with the type of the Value it stores at that key
* Add GitHub -> Account directory lookup index to SessionSrv. This is used to map external IDs
  to our internal ID format
* Fixes routing of SessionCreate messages. All messages will be routed by their external ID

Signed-off-by: Jamie Winsor <[email protected]>
@thesentinels
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @metadave and @fnichol to be potential reviewers

@reset
Copy link
Collaborator Author

reset commented Jun 2, 2016

gif-keyboard-10793861113696275566

@habitat-sh/habitat-core-maintainers this is ready for review

Ok(Response::with((status::Ok, encoded)))
match github::authenticate(code) {
Ok(token) => {
match github::user(&token) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The matchers are certainly doing nice work here

@fnichol
Copy link
Collaborator

fnichol commented Jun 2, 2016

@reset Aside from one question above, this look great to me. I'm reasonably sure I understand the need for this now and agree that it's the right move.

Good to merge!

@reset
Copy link
Collaborator Author

reset commented Jun 2, 2016

gif-keyboard-9338308017576526635

@thesentinels r+

@thesentinels
Copy link
Contributor

📌 Commit 09c0234 has been approved by reset

@thesentinels
Copy link
Contributor

⌛ Testing commit 09c0234 with merge a4f0d7f...

thesentinels pushed a commit that referenced this pull request Jun 2, 2016
* Add `ExpiringSet` to dbcache crate. This is identical to the `BasicSet` except entities will
  expire from the set after an expiration time defined by a static trait function
* `IndexSet` can now set the type of Key along with the type of the Value it stores at that key
* Add GitHub -> Account directory lookup index to SessionSrv. This is used to map external IDs
  to our internal ID format
* Fixes routing of SessionCreate messages. All messages will be routed by their external ID

Signed-off-by: Jamie Winsor <[email protected]>

Pull request: #616
Approved by: reset
@thesentinels
Copy link
Contributor

☀️ Test successful - travis

@thesentinels thesentinels merged commit 09c0234 into master Jun 2, 2016
@fnichol fnichol deleted the move-oauth branch June 2, 2016 01:05
jtimberman pushed a commit that referenced this pull request Jun 12, 2016
* Add `ExpiringSet` to dbcache crate. This is identical to the `BasicSet` except entities will
  expire from the set after an expiration time defined by a static trait function
* `IndexSet` can now set the type of Key along with the type of the Value it stores at that key
* Add GitHub -> Account directory lookup index to SessionSrv. This is used to map external IDs
  to our internal ID format
* Fixes routing of SessionCreate messages. All messages will be routed by their external ID

Signed-off-by: Jamie Winsor <[email protected]>

Pull request: #616
Approved by: reset
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