-
Notifications
You must be signed in to change notification settings - Fork 313
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 AK/SK Certification for uploading snapshot to cloud #972
base: master
Are you sure you want to change the base?
Changes from all commits
963e7f4
4b83c4b
6c00b6a
c5f9eb6
11bcc97
d256ce8
e780435
530ce6a
d69e517
86fbd78
7932ac4
3b3207f
816dc7f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,8 +66,8 @@ | |
version = "2.0.0" | ||
|
||
[[constraint]] | ||
branch = "master" | ||
name = "github.com/gophercloud/gophercloud" | ||
revision = "3ad89c4ea008e0e0b729720040b0be25a35d4615" | ||
|
||
[[constraint]] | ||
name = "github.com/ceph/go-ceph" | ||
|
@@ -101,3 +101,7 @@ | |
go-tests = true | ||
non-go = true | ||
unused-packages = true | ||
|
||
[[constraint]] | ||
name = "github.com/emicklei/go-restful" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we need go-restfull lib? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just for getting signature. the code uses go-restful lib. |
||
version = "=2.8.0" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright 2019 The OpenSDS Authors. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fileter is used for api-server client, please remove this code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry,this is used for keystone.go, I can not remove this code. |
||
// | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OpenSDS copyright missing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is these lines written newly by us? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Its there in the line 1 |
||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package auth | ||
|
||
import ( | ||
"github.com/emicklei/go-restful" | ||
"github.com/micro/go-log" | ||
c "github.com/opensds/opensds/contrib/backup/multicloud/context" | ||
) | ||
|
||
type NoAuth struct { | ||
} | ||
|
||
func (auth *NoAuth) Filter(req *restful.Request, resp *restful.Response, chain *restful.FilterChain) { | ||
log.Log("Noauth filter begin") | ||
ctx := req.Attribute(c.KContext).(*c.Context) | ||
log.Log(ctx.TenantId) | ||
params := req.PathParameters() | ||
if tenantId, ok := params["tenantId"]; ok { | ||
ctx.TenantId = tenantId | ||
} | ||
|
||
ctx.IsAdmin = ctx.TenantId == c.NoAuthAdminTenantId | ||
chain.ProcessFilter(req, resp) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this PR is too huge for a single commit. 16K+ lines of code, please split it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1