Skip to content

Commit

Permalink
fix(dump) skip Developer Portal credentials in Kong Enterprise
Browse files Browse the repository at this point in the history
Kong Enterprise Developer Portal exposes the credentials (basic/key) of
Developers on the Admin API, but doesn't expose the consumers causing
issues during export.

The root cause here is in Kong Enterprise but to help out decK users,
I'm going to put a work-around into decK.

The fix here is that for any basic and key auth credential, if the
associated consumer is not found by decK, it will not be exported.

Fix #75
  • Loading branch information
hbagdi committed Sep 16, 2019
1 parent 53853c6 commit da787d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dump/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func GetState(client *kong.Client, config Config) (*state.KongState, error) {
if err != nil {
// key could belong to a consumer which is not part
// of this sub-set of the entire data-base
if err == state.ErrNotFound && len(config.SelectorTags) > 0 {
if err == state.ErrNotFound {
continue
}
return nil, errors.Wrapf(err,
Expand Down Expand Up @@ -129,7 +129,7 @@ func GetState(client *kong.Client, config Config) (*state.KongState, error) {
if err != nil {
// key could belong to a consumer which is not part
// of this sub-set of the entire data-base
if err == state.ErrNotFound && len(config.SelectorTags) > 0 {
if err == state.ErrNotFound {
continue
}
return nil, errors.Wrapf(err,
Expand Down

0 comments on commit da787d7

Please sign in to comment.