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 Support for OCI Authentication Protocol #1109

Draft
wants to merge 144 commits into
base: develop
Choose a base branch
from
Draft

Conversation

quixote911
Copy link

No description provided.

@codecov
Copy link

codecov bot commented Dec 14, 2020

Codecov Report

Merging #1109 (d848664) into develop (ad56109) will decrease coverage by 1.13%.
The diff coverage is 70.46%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1109      +/-   ##
===========================================
- Coverage    91.10%   89.97%   -1.14%     
===========================================
  Files           42       44       +2     
  Lines         2563     2712     +149     
  Branches       735      758      +23     
===========================================
+ Hits          2335     2440     +105     
- Misses         228      272      +44     
Flag Coverage Δ
integration 76.43% <21.47%> (-3.20%) ⬇️
legacy 54.20% <21.47%> (-1.91%) ⬇️
unit 50.44% <70.46%> (+1.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/authorizer/index.js 100.00% <ø> (ø)
lib/authorizer/util.js 53.57% <53.57%> (ø)
lib/authorizer/oci-v1.js 74.38% <74.38%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 146639e...d848664. Read the comment docs.

@quixote911 quixote911 changed the base branch from master to develop December 14, 2020 09:44
Copy link
Member

@codenirvana codenirvana left a comment

Choose a reason for hiding this comment

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

Please rebase to develop.

Also, this auth scheme will not work in the browser because of native dependencies.

Comment on lines +56 to +57
"http-signature": "1.3.1",
"sshpk": "1.16.1"
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 place these in the right order?

* Specification document: https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/signingrequests.htm
*/
var sshpk = require('sshpk'),
UrlParser = require('url'),
Copy link
Member

Choose a reason for hiding this comment

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

Use postman-url-encoder instead

urlEncoder = require('postman-url-encoder'),
RequestBody = require('postman-collection').RequestBody,
bodyBuilder = require('../requester/core-body-builder');

Copy link
Member

Choose a reason for hiding this comment

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

Extra newline.

// ------------------------------------------------------------

// eslint-disable-next-line one-var
var convertToDomHeadersObject = function (postmanHeaders) {
Copy link
Member

Choose a reason for hiding this comment

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

Why do we have to convert PostmanHeaderList?
Facing any issue with the get/set methods exposed by it?

"tenancy": "ocid1.tenancy.oc1..aaaaaaaa5h4h55rwzjwrufcfaqp4h5gxcqv65ozk7rytrvcltwujfj45g25a",
"user": "ocid1.user.oc1..aaaaaaaax4esyzwnhlxdb6h5dfopzkuw5kujtffz3y4yvczqnjwlpbnk7q7q",
"fingerprint": "42:34:8b:df:0a:9c:b0:c8:b6:ac:7a:c2:ce:7e:45:85",
"privatekey": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEAvOxs9ybstMcalgCEbNIHeNh7oqVBLAC0+bhi7KEr2xYFSQws\nu4MdPXqSCTQu1/4fsMoCbRLZMRmC8YonjjhdRyVFZrAkE5Q9WfF3N40s/GVK8Myb\nWxBS5hZnc4td/d+OoGLE5aKNwaFNoTn7iDCU1JfG+d4l7Z5twzHESs3XnzNSeRms\n/MAFk3zdjlpOm9pbafFqFoim6Be8dRXtWU0xN5VRHD3txisQJlcLVNMm6IK9UWUg\nJzmn8d5ASwvU75/nJKc8DLoQ0cVeYaIhXWGME6ApXyb62zKmccPpkRzRZSJYPeUo\nLK2JC/w/os1NAi0mTGb/KqOzd7BJf1RO0SQYHwIDAQABAoIBAGRS4KJ2hyiQuquB\nZtEqz1D7FNyQCQXG8lPR+KZUCCf1j6T01CRXQgXNuxMsJNwKVOXawGMPqUqLk5+U\nj+DUSaRoRGx9iQrko5fJxFc5nvQBDkTFQpKfHoaUyybukWE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\nfVVz1laGP3tcpXDEp80hbrDxO7aOexUgCFKHrYTAgVCm8Eqzz8HdsQ==\n-----END RSA PRIVATE KEY-----"
Copy link
Member

Choose a reason for hiding this comment

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

How are we planning to accept this in UI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants