Avoid exposing sensitive data to client (#1543)

This PR changes the behavior of controller API which
wrongly exposes sensitive data to the client. Now, the
API only returns success if secret/configmap exists;
otherwise, an error will be returned.
This commit is contained in:
Ta-Ching Chen
2020-02-24 20:02:33 +08:00
committed by GitHub
parent fc5711ce7c
commit 5c09099084
8 changed files with 27 additions and 67 deletions
+5 -6
View File
@@ -17,11 +17,10 @@ limitations under the License.
package fake
import (
v1 "github.com/fission/fission/pkg/controller/client/v1"
"io"
apiv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "github.com/fission/fission/pkg/controller/client/v1"
"github.com/fission/fission/pkg/info"
)
@@ -34,12 +33,12 @@ func newMiscClient(c *v1.V1) v1.MiscInterface {
return &FakeMisc{}
}
func (c *FakeMisc) SecretGet(m *metav1.ObjectMeta) (*apiv1.Secret, error) {
return nil, nil
func (c *FakeMisc) SecretExists(m *metav1.ObjectMeta) error {
return nil
}
func (c *FakeMisc) ConfigMapGet(m *metav1.ObjectMeta) (*apiv1.ConfigMap, error) {
return nil, nil
func (c *FakeMisc) ConfigMapExists(m *metav1.ObjectMeta) error {
return nil
}
func (c *FakeMisc) GetSvcURL(label string) (string, error) {