Code Monkey home page Code Monkey logo

konga's Introduction

More than just another GUI to KONG Admin API Build Status Gitter chat

Dashboard

Konga is not an official app. No affiliation with Kong.

Summary

Discussions & Support

If you need to discuss anything Konga related, we have a chatroom on Gitter:

Gitter chat

Features

  • Manage all Kong Admin API Objects.
  • Import Consumers from remote sources (Databases, files, APIs etc.).
  • Manage multiple Kong Nodes.
  • Backup, restore and migrate Kong Nodes using Snapshots.
  • Monitor Node and API states using health checks.
  • Email & Slack notifications.
  • Multiple users.
  • Easy database integration (MySQL, postgresSQL, MongoDB).

Compatibility

From 0.14.0 onwards, Konga is ONLY compatible with Kong 1.x

If you're on an older Kong version , use this branch or konga:legacy from docker hub instead.

Prerequisites

Used libraries

Installation

Install npm and node.js. Instructions can be found here.

Install bower, ad gulp packages.

$ git clone https://github.com/pantsel/konga.git
$ cd konga
$ npm i

Configuration

You can configure your application to use your environment specified settings.

There is an example configuration file on the root folder.

.env_example

Just copy this to .env and make necessary changes to it. Note that this .env file is in .gitignore so it won't go to VCS at any point.

Environment variables

These are the general environment variables Konga uses.

VAR DESCRIPTION VALUES DEFAULT
HOST The IP address that will be bind by Konga's server - '0.0.0.0'
PORT The port that will be used by Konga's server - 1337
NODE_ENV The environment production,development development
SSL_KEY_PATH If you want to use SSL, this will be the absolute path to the .key file. Both SSL_KEY_PATH & SSL_CRT_PATH must be set. - null
SSL_CRT_PATH If you want to use SSL, this will be the absolute path to the .crt file. Both SSL_KEY_PATH & SSL_CRT_PATH must be set. - null
KONGA_HOOK_TIMEOUT The time in ms that Konga will wait for startup tasks to finish before exiting the process. - 60000
DB_ADAPTER The database that Konga will use. If not set, the localDisk db will be used. mongo,mysql,postgres -
DB_URI The full db connection string. Depends on DB_ADAPTER. If this is set, no other DB related var is needed. - -
DB_HOST If DB_URI is not specified, this is the database host. Depends on DB_ADAPTER. - localhost
DB_PORT If DB_URI is not specified, this is the database port. Depends on DB_ADAPTER. - DB default.
DB_USER If DB_URI is not specified, this is the database user. Depends on DB_ADAPTER. - -
DB_PASSWORD If DB_URI is not specified, this is the database user's password. Depends on DB_ADAPTER. - -
DB_DATABASE If DB_URI is not specified, this is the name of Konga's db. Depends on DB_ADAPTER. - konga_database
DB_PG_SCHEMA If using postgres as a database, this is the schema that will be used. - public
KONGA_LOG_LEVEL The logging level silly,debug,info,warn,error debug on dev environment & warn on prod.
TOKEN_SECRET The secret that will be used to sign JWT tokens issued by Konga - -
NO_AUTH Run Konga without Authentication true/false -
BASE_URL Define a base URL or relative path that Konga will be loaded from. Ex: www.example.com/konga -
KONGA_SEED_USER_DATA_SOURCE_FILE Seed default users on first run. Docs. -
KONGA_SEED_KONG_NODE_DATA_SOURCE_FILE Seed default Kong Admin API connections on first run Docs -

Databases Integration

Konga is bundled with It's own persistence mechanism for storing users and configuration.

A local persistent object store is used by default, which works great as a bundled, starter database (with the strict caveat that it is for non-production use only).

The application also supports some of the most popular databases out of the box:

  1. MySQL
  2. MongoDB
  3. PostgresSQL

In order to use them, set the appropriate env vars in your .env file.

Running Konga

Development

$ npm start

Konga GUI will be available at http://localhost:1337

Production


In case of MySQL or PostgresSQL adapters, Konga will not perform db migrations when running in production mode.

You can manually perform the migrations by calling $ node ./bin/konga.js prepare , passing the args needed for the database connectivity.

For example:

$ node ./bin/konga.js  prepare --adapter postgres --uri postgresql://localhost:5432/konga

The process will exit after all migrations are completed.


Finally:

$ npm run production

Konga GUI will be available at http://localhost:1337

Production Docker Image

The following instructions assume that you have a running Kong instance following the instructions from Kong's docker hub

$ docker pull pantsel/konga
$ docker run -p 1337:1337 \
             --network {{kong-network}} \ // optional
             --name konga \
             -e "NODE_ENV=production" \ // or "development" | defaults to 'development'
             -e "TOKEN_SECRET={{somerandomstring}}" \
             pantsel/konga

To use one of the supported databases

  1. Prepare the database

Note: You can skip this step if using the mongo adapter.

You can prepare the database using an ephemeral container that runs the prepare command.

Args

argument description default
-c command -
-a adapter (can be postgres or mysql) -
-u full database connection url -
$ docker run --rm pantsel/konga:latest -c prepare -a {{adapter}} -u {{connection-uri}}
  1. Start Konga
$ docker run -p 1337:1337 
             --network {{kong-network}} \ // optional
             -e "TOKEN_SECRET={{somerandomstring}}" \
             -e "DB_ADAPTER=the-name-of-the-adapter" \ // 'mongo','postgres','sqlserver'  or 'mysql'
             -e "DB_HOST=your-db-hostname" \
             -e "DB_PORT=your-db-port" \ // Defaults to the default db port
             -e "DB_USER=your-db-user" \ // Omit if not relevant
             -e "DB_PASSWORD=your-db-password" \ // Omit if not relevant
             -e "DB_DATABASE=your-db-name" \ // Defaults to 'konga_database'
             -e "DB_PG_SCHEMA=my-schema"\ // Optionally define a schema when integrating with prostgres
             -e "NODE_ENV=production" \ // or 'development' | defaults to 'development'
             --name konga \
             pantsel/konga
             
             
 // Alternatively you can use the full connection string to connect to a database
 $ docker run -p 1337:1337 
              --network {{kong-network}} \ // optional
              -e "TOKEN_SECRET={{somerandomstring}}" \
              -e "DB_ADAPTER=the-name-of-the-adapter" \ // 'mongo','postgres','sqlserver'  or 'mysql'
              -e "DB_URI=full-connection-uri" \
              -e "NODE_ENV=production" \ // or 'development' | defaults to 'development'
              --name konga \
              pantsel/konga

The GUI will be available at http://{your server's public ip}:1337

It is possible to seed default users on first install.

You may also configure Konga to authenticate via LDAP.

Upgrading

In some cases a newer version of Konga may introduce changes in database schemas. The only thing you need to do is to start Konga in dev mode once so that the migrations will be applied. Then stop the app and run it again in production mode.

if you're using docker, you can lift an ephemeral container, as stated before:

$ docker run --rm pantsel/konga:latest -c prepare -a {{adapter}} -u {{connection-uri}}

FAQ

1. Getting blank page with Uncaught ReferenceError: angular is not defined

In some cases when running npm install, the bower dependencies are not installed properly. You will need to cd into your project's root directory and install them manually by typing

$ npm run bower-deps
2. Can't add/edit some plugin properties.

When a plugin property is an array, the input is handled by a chip component. You will need to press enter after every value you type in so that the component assigns it to an array index. See issue #48 for reference.

3. EACCES permission denied, mkdir '/kongadata/'.

If you see this error while trying to run Konga, it means that konga has no write permissions to it's default data dir /kongadata. You will just have to define the storage path yourself to a directory Konga will have access permissions via the env var STORAGE_PATH.

4. The hook grunt is taking too long to load

The default timeout for the sails hooks to load is 60000. In some cases, depending on the memory the host machine has available, startup tasks like code minification and uglyfication may take longer to complete. You can fix that by setting then env var KONGA_HOOK_TIMEOUT to something greater than 60000, like 120000.

More Kong related stuff

Author

Panagis Tselentis

License

The MIT License (MIT)
=====================

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

konga's People

Contributors

debu99 avatar gcallsen avatar hansk-p avatar jeremyjpj0916 avatar joshtwist avatar kimkit avatar larsnaesbye avatar luiz-idwall avatar mazubieta avatar migolovanov avatar mikeatzillowgroup avatar miso-m avatar mym786 avatar narate avatar neilmcgibbon avatar nigelkirby avatar pantsel avatar peterjgrainger avatar piersharding avatar posquit0 avatar rkt2spc avatar rmetcalf9 avatar sashahilton00 avatar spksoft avatar sriniprash avatar sturman avatar sweco-semhul avatar undernewmanagement avatar yalhyane avatar yang-xiaodong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

konga's Issues

Make it possible to add Kong nodes based on url

We run kong on a cluster which sits behind a load balancer. The IP and port of the kong instances is not fixed and therefore it is difficult to use Konga.

It would be nice if we could specify new Kong nodes with the URL to our load balancer and based on the cluster info Konga could figure out the rest.

Summary: Instead of having to provide IP:port, i want to add new node based on a URL. Say http://internal.mysite.com/kong-admin-endpoint/.

upstream can not be renamed

to name a upstream on creation is ok. but it can not be renamed anymore. an error was reported as follows:

ReferenceError: $uibModalInstance is not defined
    at production.min.js:51
    at processQueue (production.min.js:9)
    at production.min.js:9
    at Scope.$eval (production.min.js:9)
    at Scope.$digest (production.min.js:9)
    at Scope.$apply (production.min.js:9)
    at done (production.min.js:8)
    at completeRequest (production.min.js:8)
    at XMLHttpRequest.xhr.onload (production.min.js:8)

Are the configs of backend and frondend changed?

I just upgraded my codebase of konga to the latest version. But I found that I can not config the app as I did before via the local.js for backend, and config.json for frontend. The backend will be bound to http://localhost:port whatever I change the backend address. Only the port config works. Is there anything changed w.r.t the config of the backend/frontend? BTW, I surely have to change the address of the backend because it has to be visible from the internet. localhost won't work in most cases, right?

Make konga work with relative paths

We run konga on a cluster and at the moment rely on web paths to route traffic to the correct instance.

That means we call a URL like so: http://cluster.example.com/konga-gui/. The problem is that Konga assumes assets are found on the webroot and therefore the frontend is not loaded.

In the logs and HTML this is reflected. Notice all the /vendors.min.css, /frontend.min.js etc.

This was mentioned as a part of #14, but not fully implemented it seems. What I would like is a environment variable KONGA_FRONTEND_WEBROOT (or something more fitting) that will be prepented to all the asset paths.

HTML:


<!DOCTYPE html><html data-ng-app="frontend"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Konga</title><link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"><link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"><link rel="stylesheet" href="/vendors.min.css"><link rel="stylesheet" href="/frontend.min.css"></head><body data-ng-cloak class="ng-cloak"><div data-ui-view="header"></div><div ng-if="isAuthenticated() && $state.name != 'admin'" class="page-head container-fluid"><div class="container"><h3 class="page-title"><span ng-bind-html="$state.data.prefix" class="page-title-prefix"></span> <span ng-bind-html="$state.data.pageName"></span>&nbsp;<div ng-show="loading" id="spinner" data-spinner="{&quot;radius&quot;: 15,&quot;strokeWidth&quot;:3}" style="display: inline-block"></div></h3><ui-breadcrumbs displayname-property="data.displayName" template-url="/frontend/core/layout/partials/uiBreadcrumbs.tpl.html"></ui-breadcrumbs></div></div><div class="container main-container"><div data-ui-view="content"></div></div><div data-ui-view="footer"></div><script>(function onLoad() {
                var io;

                Object.defineProperty(window, 'io', {
                    get: function get() {
                        return io;
                    },
                    set: function set(value) {
                        var sails;

                        io = value;

                        Object.defineProperty(io, 'sails', {
                            get: function get() {
                                return sails;
                            },
                            set: function set(value) {
                                sails = value;

                                sails.url = 'http://cluster.example.com/konga-backend';
                            }
                        });
                    }
                });

                //Logging
                window.enableLogs = 'false'

            })();</script><script src="/vendors.min.js"></script><script src="/frontend.min.js"></script></body></html>

Blank value for optional fields results in empty array in config

Hi,

I came across this while trying to config statsd plugin for Kong through Konga dashboard.
Leaving the metrics field blank and results in following config:

{
  "api_id": "...",
  "id": "...",
  "created_at": 1493836410000,
  "enabled": true,
  "name": "statsd",
  "config": {
    "host": "127.0.0.1",
    "metrics": {},
    "timeout": 10000,
    "port": 8125
  }
}

While creating a plugin using curl and Kong's admin API without specifying any metric results in this config:

{
  "api_id": "...",
  "id": "...",
  "name": "statsd",
  "enabled": true,
  "created_at": 1493836153000,
  "config": {
    "host": "127.0.0.1",
    "timeout": 10000,
    "metrics": [
      "request_count",
      "latency",
      "request_size",
      "status_count",
      "response_size",
      "unique_users",
      "request_per_user",
      "upstream_latency"
    ],
    "port": 8125
  }
}

Needless to say that manually including all items (in this case metric items) in Konga interface would result in correct configuration being set.

I think the expected behavior should be to leave out optional blank fields out of API call to Kong's admin.

Unable to edit some fields in plugin settings editors

IP restriction plugin:
For example, unable to edit whitelist/blacklist entries In IP restriction plugin editor. It doesn't send anything to server, and doesn't display values set manually. Seems there is no ng-model set on client side for these fields at all.
Also, If customer is selected once, it is unable to remove its uuid from customer field. If you leave it empty, it uses previous customer value.

JWT plugin:
Unable to edit URL param names, it doesn't store values from this field.

Unable to login with docker instance

I used docker by cmd docker run -p -d 3000:3000 -p 1338:1338 -e KONGA_BACKEND_URL=127.0.0.1:8001 --link kong:kong --name konga pantsel/konga but unable to login by admin - adminadminadmin at the login page. Is there any clue ? Thanks

Cannot save user if Password is short/same as username

I tried to change password of demo user to demo and it wont let me save user. Which is ok but there is not message provided back for reason of not saving, i am going to assume its either password was of short length or same as username.

Auto Refresh

I find my self constantly refreshing the dashboard to see updated stats in the connection box! Any chance we could get these on a (configurable) polling time, say every 5sec? I'd really like to see more real-time computable stats on the Kong nodes.

Thank you for your wonderful work!

Cannot edit API

hello..i. using 0.6.4 version. when im try to edit API, it`s not show the api detail with error

angular.js:14199 TypeError: Cannot read property 'version' of undefined
at ChildScope.$scope.isRequestPathOrUriStripped (apis-controller.js:42)
at Array.fn0 (eval at compile (angular.js:15126), :4:1063)
at expressionInputsWatch (angular.js:16274)
at Scope.$digest (angular.js:17828)
at Scope.$apply (angular.js:18102)
at angular.js:19950
at completeOutstandingRequest (angular.js:6045)
at angular.js:6324

. But when i`m clicking with new tab..the api detail was appear.

PostgreSQL adapter not working

Latest version that introduced some real persistence (thanks for that, by the way!) doesn't seem to be fully working:

kong-ui-db_1  | ERROR:  relation "public.konga_users" does not exist at character 46
kong-ui-db_1  | STATEMENT:  SELECT COUNT(*) as count FROM (SELECT * FROM "public"."konga_users" ) AS "konga_users"
ui_1          | User had models, so no seed needed
ui_1          | A hook (`load-db`) failed to load!
ui_1          | Error (E_UNKNOWN) :: Encountered an unexpected error
ui_1          | error: relation "public.konga_users" does not exist
ui_1          |     at Connection.parseE (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:539:11)
ui_1          |     at Connection.parseMessage (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:366:17)
ui_1          |     at Socket.<anonymous> (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:105:22)
ui_1          |     at emitOne (events.js:96:13)
ui_1          |     at Socket.emit (events.js:191:7)
ui_1          |     at readableAddChunk (_stream_readable.js:176:18)
ui_1          |     at Socket.Readable.push (_stream_readable.js:134:10)
ui_1          |     at TCP.onread (net.js:563:20)
ui_1          |
ui_1          | Details:  error: relation "public.konga_users" does not exist
ui_1          |

A quick docker-compose.yml that demonstrates this problem:

version: '2'
services:
  kong-ui-db:
    image: postgres:9.4
    environment:
      - POSTGRES_USER=kong-ui
      - POSTGRES_DB=kong-ui
      - POSTGRES_PASSWORD=testtest123
  ui:
    image: pantsel/konga:latest
    environment:
      - DB_ADAPTER=postgres
      - DB_HOST=db
      - DB_USER=kong-ui
      - DB_PASSWORD=testtest123
      - DB_DATABASE=kong-ui
    links:
      - kong-ui-db:db

Release Konga as a Docker image

It would be awesome if Konga were distributed as a Docker image with the possibility to configure via environment variables.

This way it would be easy to deploy on clusters and start locally to configure Kong.

infinite errors reported after changing admin user settings

I just deployed v0.5.1. At first, it worked just fine. But after I changed the admin user's profile, I can not switch back to the main page. I was stuck on the admin user's settings page wherever I clicked. If I refresh the page, I got infinite following two errors reported in the browser's console. And the mem is being eaten up. And the exact same thing happened even if I switched to production mode. I am not sure if the error info is enough because I am not very familiar with frontend dev. I would like to provide more info if necessary. thanks!

Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: []
http://errors.angularjs.org/1.5.11/$rootScope/infdig?p0=10&p1=%5B%5D
    at angular.js:68
    at Scope.$digest (angular.js:17874)
    at Scope.$apply (angular.js:18102)
    at angular.js:19950
    at completeOutstandingRequest (angular.js:6045)
    at angular.js:6324
(anonymous) @ angular.js:14199
(anonymous) @ angular.js:10707
$apply @ angular.js:18104
(anonymous) @ angular.js:19950
completeOutstandingRequest @ angular.js:6045
(anonymous) @ angular.js:6324
angular.js:68 Uncaught Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: []
http://errors.angularjs.org/1.5.11/$rootScope/infdig?p0=10&p1=%5B%5D
    at angular.js:68
    at Scope.$digest (angular.js:17874)
    at Scope.$apply (angular.js:18102)
    at angular.js:19950
    at completeOutstandingRequest (angular.js:6045)
    at angular.js:6324

Cannot assign ACL plugin to existing API

ACL plugin cannot be assign to existing API via Konga, though I can successfully assign Key Auth plugin and some other plugins but when I try to do the same thing with ACL nothing happens, it gets stuck on the white loading circle that you can see on the add plugin button, also when I try to assign the same plugin via Kong API everything works just fine, you can then edit plugin options (whitelist, blacklist, enable/disable) via Konga WebUI with no issues, but adding a new one is definitely an issue, any solution on this problem?

frontend model npm install error

hi,@pantsel i have download konga-0.2.1 and follow the install step ,when i installed all dependencies and run npm install in ~/konga-0.2.1 i got some errors:

npm install

[email protected] install /Users/{user}/tmp/konga-0.2.1
cd frontend && npm install && cd ../backend && npm install

[email protected] postinstall /Users/{user}/tmp/konga-0.2.1/frontend
bower install

module.js:474
throw err;
^

Error: Cannot find module 'internal/fs'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at evalmachine.:17:20
at Object. (/Users/{user}/tmp/konga-0.2.1/frontend/node_modules/bower/node_modules/graceful-fs/fs.js:11:1)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)

npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v7.1.0
npm ERR! npm v4.0.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: bower install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'bower install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the frontend package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bower install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs frontend
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls frontend
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/{user}/tmp/konga-0.2.1/frontend/npm-debug.log

npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v7.1.0
npm ERR! npm v4.0.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: cd frontend && npm install && cd ../backend && npm install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'cd frontend && npm install && cd ../backend && npm install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the kongadmin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cd frontend && npm install && cd ../backend && npm install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs kongadmin
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls kongadmin
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/{user}/tmp/konga-0.2.1/npm-debug.log

my environment is
node -v
v7.1.0
npm -v
4.0.2

Konga's tables are not created when starting the app / upgrading

This issue is created as a reference.

Sails js - the framework Konga is built upon - won't let the app alter database tables when running in production mode.

This is a failsafe to protect against inadvertently damaging your production data during deployment.

More info here .

To get around that for now, you will need to start Konga in develoment mode the first time only. That way the app will be able to create the needed db tables.

You can do that by setting the NODE_ENV environment variable to development

Manually starting Konga in development mode

$ node app.js --dev

Docker image

$ docker run -p 1338:1338 
             --link kong:kong \
             -e "DB_ADAPTER=the-name-of-the-adapter" \ // 'postgres','sqlserver'  or 'mysql'
             -e "DB_HOST=your-db-hostname" \
             -e "DB_PORT=your-db-port" \ // Defaults to the default db port
             -e "DB_USER=your-db-user" \ // Omit if not relevant
             -e "DB_PASSWORD=your-db-password" \ // Omit if not relevant
             -e "DB_DATABASE=your-db-name" \ // Defaults to 'konga_database'
             -e "NODE_ENV=development" \ //  Set the environment to development for the first run
             --name konga \
             pantsel/konga

Same logic must be applied in case a new version of Konga introduces alterations to existing db tables or new ones.

No content access localhost:1337

i install the konga follow the document.
when i access the url , it response nothing.
Press F12 ,it show that : angular is not defined.

Konga crashes when adding API key to consumer with no prior keys

When creating a new consumer through Konga, followed by creating a new API key for the key-auth plugin, Konga crashes due to the consumer.credentials object being undefined. Below is the loggin output:

<- POST /kong/consumers/9dd4179e-aa4a-433d-bcc8-b5d92f87c25d/key-auth (98ms 200) [0] /Users/sashahilton/Documents/D2D/konga/backend/api/services/ConsumerCredentialsService.js:15 [0] consumer.credentials.push(credential) [0] ^ [0] [0] TypeError: Cannot read property 'push' of undefined [0] at /Users/sashahilton/Documents/D2D/konga/backend/api/services/ConsumerCredentialsService.js:15:37

The problem is also present on the other API credential methods.

When running on relative path the frontend calls /socket.io in infinite loop

Relative paths seems really close to work now, but using the latest dev branch I get tons of these errors when opening the frontend. In sails.io.js there seem to be a setting opts.path=opts.path||"/socket.io", but I'm not sure where to configure opts.path.

Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: []
http://errors.angularjs.org/1.5.11/$rootScope/infdig?p0=10&p1=%5B%5D
    at vendors.min.js:3
    at h.$digest (vendors.min.js:6)
    at h.$apply (vendors.min.js:6)
    at vendors.min.js:6
    at o (vendors.min.js:4)
    at vendors.min.js:4
(anonymous) @ vendors.min.js:5
(anonymous) @ vendors.min.js:5
$apply @ vendors.min.js:6
(anonymous) @ vendors.min.js:6
o @ vendors.min.js:4
(anonymous) @ vendors.min.js:4

The URL it tries to call is "/socket.io", instead of a relative path.

http://MY_URL.com/socket.io/?__sails_io_sdk_version=0.11.0&__sails_io_sdk_platform=browser&__sails_io_sdk_language=javascript&EIO=3&transport=polling&t=1488279833822-5

In my case the correct URL would be:

http://MY_URL.com/konga-backend/socket.io/?__sails_io_sdk_version=0.11.0&__sails_io_sdk_platform=browser&__sails_io_sdk_language=javascript&EIO=3&transport=polling&t=1488279833822-5

Can't setup ACL blacklist/whitelist from the UI

Trying to setup the ACL plugin fails due to some UI bug that won't recognise the already created groups in the list.

Using the api directly to create the config works as expected and once created like that, I can see the proper config in the UI.

Example:
blacklist not configured due the bug.
whitelist configured using the api.
image

{
  "api_id": "f7caca8a-0f54-4d8f-8b97-8bc5c12f1256",
  "id": "a4f1f4b3-8968-4021-8b57-bcf4a9dc66fb",
  "created_at": 1483674535000,
  "enabled": true,
  "name": "acl",
  "config": {
    "blacklist": {},
    "whitelist": [
      "android"
    ]
  }
}

I've tried to use another dashboard solution and worked perfectly fine.

Add a connection chooser menu on the bottom panel

Konga is awesome, but there is one little thing that sets me back a lot of time: having to go into settings to choose the connection.
I use Kong in several independent clusters and it would be nice to have a quick way to alternate connections, let's say, a menu that could open when you click the current connection on the status bar. In the same sense that there are links to the github page and to the github issues page, it would be a nice feature that would immensely improve the usability of Konga.

Allow to configure either caching or enable/disable prefetching of consumer keys

We have a lot of consumers ... and unfortunately if too many users are playing with Konga you end up DOSing Kong a little bit, from all of the GET /kong/consumers/{id}/credentials calls. Ideally I think these calls should be cached, but just having an option to configure Konga to disable this action would be enough to make this usable.

Can not access the konga

When start up the service, found that I and a few colleagues can access the service, but there are also some other colleagues can't access.This should have nothing to do with the browser.
Do konga have to limit access to IP or amount, or is this a bug?

kong 10.x compatibility

The SSL plugin has been removed and dynamic SSL capabilities have
been added to Kong core, and are configurable via new properties on the API
entity

But there is no config UI for the new certificates endpoint.

Load balancing.

But there is no config UI for the new upstreams and targets neither.

Can't edit consumer/api with custom user

Using a custom user (administrator), it's impossible to edit api/consumer. Creation and deletion are always possible.
It seems that it's due to the absence of node_id in custom user (while it's equal to 'http://kong:8001' for default user).
As a result, the NodeService.isActiveNodeSet method rejects the returned promise

Adding apis consecutively pre-populates fields with previous entry

I noticed a strange issue in the latest (0.6.4, docker image) release:
I was adding three apis, and as soon as I clicked to add the second one, the form was already populated with the values of the previous api I submitted, as if I was editing it, but no, it added the api correctly and didn't touch the previous one. The same behaviour happened when I added a third api immediately afterwards, with the fields being populated with the second api's details.
The issue persists after changing to a different connection, but clears after a page refresh, although it will come back after adding an api.

MySQL adapter not working

2017/3/30 下午4:35:28User had models, so no seed needed
2017/3/30 下午4:35:28A hook (load-db) failed to load!
2017/3/30 下午4:35:28Error (E_UNKNOWN) :: Encountered an unexpected error
2017/3/30 下午4:35:28: ER_NO_SUCH_TABLE: Table 'konga.konga_users' doesn't exist
2017/3/30 下午4:35:28 at Query.Sequence._packetToError (/app/node_modules/sails-mysql/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
2017/3/30 下午4:35:28 at Query.ErrorPacket (/app/node_modules/sails-mysql/node_modules/mysql/lib/protocol/sequences/Query.js:83:18)
2017/3/30 下午4:35:28 at Protocol._parsePacket (/app/node_modules/sails-mysql/node_modules/mysql/lib/protocol/Protocol.js:280:23)
2017/3/30 下午4:35:28 at Parser.write (/app/node_modules/sails-mysql/node_modules/mysql/lib/protocol/Parser.js:73:12)
2017/3/30 下午4:35:28 at Protocol.write (/app/node_modules/sails-mysql/node_modules/mysql/lib/protocol/Protocol.js:39:16)
2017/3/30 下午4:35:28 at Socket. (/app/node_modules/sails-mysql/node_modules/mysql/lib/Connection.js:96:28)
2017/3/30 下午4:35:28 at emitOne (events.js:96:13)
2017/3/30 下午4:35:28 at Socket.emit (events.js:191:7)
2017/3/30 下午4:35:28 at readableAddChunk (_stream_readable.js:176:18)
2017/3/30 下午4:35:28 at Socket.Readable.push (_stream_readable.js:134:10)
2017/3/30 下午4:35:28 at TCP.onread (net.js:563:20)
2017/3/30 下午4:35:28 --------------------
2017/3/30 下午4:35:28 at Protocol._enqueue (/app/node_modules/sails-mysql/node_modules/mysql/lib/protocol/Protocol.js:141:48)
2017/3/30 下午4:35:28 at PoolConnection.query (/app/node_modules/sails-mysql/node_modules/mysql/lib/Connection.js:201:25)
2017/3/30 下午4:35:28 at FIND (/app/node_modules/sails-mysql/lib/adapter.js:838:20)
2017/3/30 下午4:35:28 at afterwards (/app/node_modules/sails-mysql/lib/connections/spawn.js:84:5)
2017/3/30 下午4:35:28 at /app/node_modules/sails-mysql/lib/connections/spawn.js:40:7
2017/3/30 下午4:35:28 at Ping.onOperationComplete [as _callback] (/app/node_modules/sails-mysql/node_modules/mysql/lib/Pool.js:99:5)
2017/3/30 下午4:35:28 at Ping.Sequence.end (/app/node_modules/sails-mysql/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
2017/3/30 下午4:35:28 at Ping.Sequence.OkPacket (/app/node_modules/sails-mysql/node_modules/mysql/lib/protocol/sequences/Sequence.js:105:8)
2017/3/30 下午4:35:28 at Protocol._parsePacket (/app/node_modules/sails-mysql/node_modules/mysql/lib/protocol/Protocol.js:280:23)
2017/3/30 下午4:35:28 at Parser.write (/app/node_modules/sails-mysql/node_modules/mysql/lib/protocol/Parser.js:73:12)
2017/3/30 下午4:35:28 at Protocol.write (/app/node_modules/sails-mysql/node_modules/mysql/lib/protocol/Protocol.js:39:16)
2017/3/30 下午4:35:28 at Socket. (/app/node_modules/sails-mysql/node_modules/mysql/lib/Connection.js:96:28)
2017/3/30 下午4:35:28 at emitOne (events.js:96:13)
2017/3/30 下午4:35:28 at Socket.emit (events.js:191:7)
2017/3/30 下午4:35:28 at readableAddChunk (_stream_readable.js:176:18)
2017/3/30 下午4:35:28 at Socket.Readable.push (_stream_readable.js:134:10)
2017/3/30 下午4:35:28 at TCP.onread (net.js:563:20)
2017/3/30 下午4:35:28
2017/3/30 下午4:35:28Details: Error: ER_NO_SUCH_TABLE: Table 'konga.konga_users' doesn't exist

Bottom panel connection chooser not refreshing connection

I had the opportunity to pull the new konga docker image to test the feature I suggested, and I noticed that it doesn't really switch the connection. The status bar displays the name of the new server, but the dashboard doesn't refresh, show the previous connection' stats, even after a hard refresh.

Also, not to be very picky, but would it be possible to make the list appear closer to the status bar? It would be nice to have it open near the place where we click for it to appear.

Anyway, great work, and thank you for taking the time to implement the features we suggest!

Cannot add new Kong node - 0.5.1

Using the docker image, when trying to add a new Kong node to the settings it always tries to connect to 127.0.0.1:8001 regardless of the input of the form.

Update:
Looks like it just wasn't selected as the default after creating the new node, this should probably be the default action when you only have one node configured / when you create your first node.

can not change key names in key-auth plugin

When creating or changing a key-auth plugin, the key names field does not work. It will keep blank no matter what I fill in. It seems that it has a default value function. But I am not sure. This is the request body after clicking the submit changes button:

{fields: {hide_credentials: {type: "boolean", default: false},…}, no_consumer: true}
fields: {hide_credentials: {type: "boolean", default: false},…}
anonymous: {type: "string", func: "function", default: ""}
default: ""
func: "function"
type: "string"
hide_credentials: {type: "boolean", default: false}
default: false
type: "boolean"
key_names: {type: "array", required: true, func: "function", default: "function"}
default: "function"
func: "function"
required: true
type: "array"
no_consumer: true

And the response:

{  
   "fields":{  
      "hide_credentials":{  
         "type":"boolean",
         "default":false
      },
      "key_names":{  
         "type":"array",
         "required":true,
         "func":"function",
         "default":"function"
      },
      "anonymous":{  
         "type":"string",
         "func":"function",
         "default":""
      }
   },
   "no_consumer":true
}

Actually, I met this already in version 0.4

Properly handle Pagination

Hey there, thanks for this project. The UI is very clean and enjoyable to work with. I've noticed that you do not properly handle pagination when retrieving consumers and apis. I've patched it locally, but I'm not much of a javascript developer, so likely it's not idiomatic. I'll send a PR, but if you want to solve it your way that's cool too.

Can't edit API after creation

When clicking edit on an API, the page stays on the same page and nothing happens. Konga does successfully request a few API endpoints and there are no javascript errors, the console logs the following:

SSSSSSSSSSSSSSSSSSSSSSS Object {data: Array[1], status: 200, config: Object, statusText: "OK"}

Kong Version: 0.10

I have tried in chrome, safari and firefox. This issue exists on both the master and dev branch.

add plugin controller error

At page load:
add-plugin-controller.js:119 SyntaxError: Cannot declare a parameter named 'evt' as it shadows the name of a strict mode function.

so when I click button to add plugin:
angular.js:14195Error: [$controller:ctrlreg] The controller with the name 'AddPluginController' is not registered.

how can I fix this

Can't add/edit key name for key-auth plugin

Hi Konga Team,

When adding/editing Key-Auth plugin, I can't specify the key-name.
The specified the key-name remains empty.

But I can successfully add the key name if I use kong API (command line via curl)

Hope you can fix the bug

Thanks

Can't log in

Http status -1 error when trying to log in with admin or demo user.
RHEL 6.8
NPM version 2.15.11
Node v4.7.0

Response Rate Limiting Plugin

When not setting "config.header_name" for the plugin it becomes empty string in the configuration and causes the plugin to not work. Should instead default to "X-Kong-Limit" if the string is blank.

Blank page

Hi,

After setup when start the app the screen is blacks and i have a lot of js errors.

Any ideia?

thanks

Kong UI to production

Hello,
I am currently trying to install konga to prod.
However, it seems to have an annoying problem: the url is localhost instead of my prod url, so i wont access from outside.

Regards,

Rémi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.