Skip to content

Remove usage of IKS token exchange and container route #8

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 5 additions & 20 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "go.sum|^.secrets.baseline$",
"lines": null
},
"generated_at": "2021-10-06T08:20:51Z",
"generated_at": "2021-10-26T08:03:35Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand All @@ -30,6 +30,9 @@
{
"name": "GheDetector"
},
{
"name": "GitHubTokenDetector"
},
{
"hex_limit": 3,
"name": "HexHighEntropyString"
Expand Down Expand Up @@ -78,15 +81,7 @@
"hashed_secret": "9b1063f01e32a5729e6281b5dc1db55078c4df8d",
"is_secret": false,
"is_verified": false,
"line_number": 32,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "27d02fc04a86255089839385ea0785c3f03256cf",
"is_secret": false,
"is_verified": false,
"line_number": 37,
"line_number": 31,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -157,16 +152,6 @@
"verified_result": null
}
],
"etc/libconfig.toml": [
{
"hashed_secret": "857638591e4d4d006c2069db2ffce07d9b02d608",
"is_secret": false,
"is_verified": false,
"line_number": 9,
"type": "Hex High Entropy String",
"verified_result": null
}
],
"file/provider/provider.go": [
{
"hashed_secret": "ffe250680b01d69c9853a97e17675a4f60405e17",
Expand Down
65 changes: 64 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,67 @@
[![Coverage](https://github.com/IBM/ibmcloud-volume-file-vpc/blob/gh-pages/coverage/master/badge.svg)](https://github.com/IBM/ibmcloud-volume-file-vpc/tree/gh-pages/coverage/master/cover.html)


This is an implementation of code which is used in file storage from vpc providers for IBM Cloud Kubernetes Service and Red Hat OpenShift on IBM Cloud
This is an implementation of code which is used in file storage from vpc providers for IBM Cloud Kubernetes Service and Red Hat OpenShift on IBM Cloud

# Build the library

For building the library `GO` should be installed on the system

1. On your local machine, install [`Go`](https://golang.org/doc/install).
2. GO version should be >=1.16
3. Set the [`GOPATH` environment variable](https://github.com/golang/go/wiki/SettingGOPATH).
4. Build the library

## Clone the repo or your forked repo

```
$ mkdir -p $GOPATH/src/github.com/IBM
$ cd $GOPATH/src/github.com/IBM/
$ git clone https://github.com/IBM/ibmcloud-volume-file-vpc.git
$ cd ibmcloud-volume-file-vpc
```
## Build project and runs testcases

```
$ make

```
## Build test program

```
$ cd samples
$ go build

```

## Testing

- Test the all the possible operations via sample program this will act as RIAAS client
- `cd samples`
- `./samples`

# E2E Tests

Please follow the detail steps [ here ](https://github.com/IBM/ibmcloud-storage-volume-lib/blob/samdev/e2e-final/README.md)

# How to contribute

If you have any questions or issues you can create a new issue [ here ](https://github.com/IBM/ibmcloud-volume-file-vpc/issues/new).

Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:

1. Fork the repo

2. Create your feature branch (git checkout -b my-new-feature)

3. Commit your changes (git commit -am 'Added some feature')

4. Push to the branch (git push origin my-new-feature)

5. Create new Pull Request

6. Add the test results in the PR


# For more details on support of CLI and VPC IAAS layer please refer below documentation
https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-vpc-about
8 changes: 0 additions & 8 deletions common/auth/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package auth

import (
vpciam "github.com/IBM/ibmcloud-volume-file-vpc/common/iam"
vpcfileconfig "github.com/IBM/ibmcloud-volume-file-vpc/file/vpcconfig"
"github.com/IBM/ibmcloud-volume-interface/provider/auth"
"github.com/IBM/ibmcloud-volume-interface/provider/iam"
Expand All @@ -32,13 +31,6 @@ func NewVPCContextCredentialsFactory(config *vpcfileconfig.VPCFileConfig) (*auth
IamClientSecret: config.VPCConfig.IamClientSecret,
}
ccf, err := auth.NewContextCredentialsFactory(authConfig)
if config.VPCConfig.IKSTokenExchangePrivateURL != "" {
authIKSConfig := &vpciam.IksAuthConfiguration{
IamAPIKey: config.VPCConfig.APIKey,
PrivateAPIRoute: config.VPCConfig.IKSTokenExchangePrivateURL, // Only for private cluster
}
ccf.TokenExchangeService, err = vpciam.NewTokenExchangeIKSService(authIKSConfig)
}
if err != nil {
return nil, err
}
Expand Down
185 changes: 0 additions & 185 deletions common/iam/token_exchange_iks.go

This file was deleted.

Loading