fabric8-services / admin-console Goto Github PK
View Code? Open in Web Editor NEWAdministration console
Administration console
in the openshift
, provide the .yml
manifests to deploy the admin-console
on OpenShift. First iteration may skip the database env vars until the DB is available.
config.GetSentryDSN undefined (type *configuration.Registry has no field or method GetSentryDSN)
and create an audit log record with the identity of the requester
Looks like the payload sent by GitHub has an invalid signature, though :/
The configuration is missing this env var, which causes a 503
response when the OpenShift readiness and liveness probes call the /api/status
endpoint, which prevent new deployments.
Audit logs records must be added for each operation. A flexible, JSON column will allow for storing all elements of context that are relevant for the operation. Records shall only be created and read, never updated nor deleted!
See DB design: https://www.dbdesigner.net/designer/schema/204972
the make docker-start
goal is missing in the Makefile
:(
See https://ci.centos.org/view/Devtools/job/devtools-admin-console-build-master/1/console
Fix the CI/CD chain to deploy on prod-preview cluster (for now)
As part of the makefile
, so it can run even if the golangci.com SaaS does fails to check the PR (in case it relies on generated code)
Add a new /api/tenants/update
to proxy to the GET/POST/DELETE /api/update
endpoint of the tenant service
.
Currently on preview, we don't have any sentry_dsn
env var, which causes a configuration error in https://console.dsaas-stg.openshift.com/console/project/dsaas-preview/browse/dc/admin-console?tab=environment which results in a 503 response from https://github.com/fabric8-services/admin-console/blob/master/controller/status.go#L73
We should temporarily ignore this missing env var until we have it setup for good on both platforms
Of course, this will have to be rolled back as soon as we configure Sentry for this service.
see conversation in https://chat.openshift.io/developers/pl/3j4rti6np78mmm86n81iqsf1ea
When the admin wishes to update the user's profile, the admin console backend would be calling the Auth User API for the same.
However, to do so, the admin console backend would need to call the Auth User API with the user's token which it doesn't have.
Therefore, the backend would need to generate the same ( a very shortlived one ~ 1min ) and make the necessary API calls to accomplish the administration task.
see discussion on https://chat.openshift.io/developers/pl/nqfpt7yri3duxjp15bzysu8emh
The status
endpoint does not report any info, not even the build commit/time
Using env vars to get the Postgres credentials.
Also, include in OpenShift template for deployment
We need to make sure that the user has the scope to search for a user
User deactivation will be performed on a regular basis, calling the appropriate endpoint on fabric8-auth
(see fabric8-services/fabric8-auth#780).
In order to avoid running a separate batch on the platform, we could use a go routine built in the admin console service itself (with a lock on a table to avoid concurrent accesses if we run multiple pods).
The deactivation process is the following:
fabric8-auth
to retrieve a list of users to deactivate (limited to a certain number of accounts) usingfabric8-auth
to deactivate each account and record an "audit log" of each user deactivationgoto 1
until the list of users to deactivate is emptyMissing config.yaml
file, required to build the Docker image.
Request URL - https://admin-console.api.prod-preview.openshift.io/api/search/users?q=ro
{
"errors":[
{
"code":"unknown_error",
"detail":"panic: net/http: abort Handler\npanic(0xa92a00, 0xc00001eab0)\n\t/usr/lib/golang/src/runtime/panic.go:513 +0x1b9\nnet/http/httputil.(*ReverseProxy).ServeHTTP(0xc00028c000, 0xc653a0, 0xc0003ea0a0, 0xc0004ca100)\n\t/usr/lib/golang/src/net/http/httputil/reverseproxy.go:284 +0x1058\ngithub.com/fabric8-services/admin-console/vendor/github.com/fabric8-services/fabric8-common/httpsupport.route(0xc66020, 0xc00006fa00, 0xc00002652f, 0xb, 0x0, 0x0, 0x0, 0x0, 0xc00002652f, 0xb)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/vendor/github.com/fabric8-services/fabric8-common/httpsupport/proxy.go:85 +0x2d0\ngithub.com/fabric8-services/admin-console/vendor/github.com/fabric8-services/fabric8-common/httpsupport.RouteHTTP(0xc66020, 0xc00006fa00, 0xc00002652f, 0xb, 0x0, 0x0, 0x0, 0xc0004d8420, 0xb3de01)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/vendor/github.com/fabric8-services/fabric8-common/httpsupport/proxy.go:43 +0x7d\ngithub.com/fabric8-services/admin-console/controller.(*SearchController).SearchUsers(0xc0004022c0, 0xc00006fa00, 0xc0004ca100, 0xc0000723c0)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/controller/search.go:61 +0x309\ngithub.com/fabric8-services/admin-console/app.MountSearchController.func1(0xc65e20, 0xc0004beba0, 0xc637e0, 0xc00006f900, 0xc0004ca100, 0x0, 0x0)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/app/controllers.go:54 +0xdd\ngithub.com/fabric8-services/admin-console/vendor/github.com/goadesign/goa/middleware/security/jwt.New.func1.1(0xc65e20, 0xc0004be990, 0xc637e0, 0xc00006f900, 0xc0004ca100, 0xc65e20, 0xc0004be990)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/vendor/github.com/goadesign/goa/middleware/security/jwt/jwt.go:123 +0x4c3\ngithub.com/fabric8-services/admin-console/app.handleSecurity.func1(0xc65e20, 0xc0004be990, 0xc637e0, 0xc00006f900, 0xc0004ca100, 0xc65e20, 0xc0004be960)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/app/security.go:49 +0x177\ngithub.com/fabric8-services/admin-console/app.handleSearchOrigin.func1(0xc65e20, 0xc0004be960, 0xc637e0, 0xc00006f900, 0xc0004ca100, 0x0, 0x0)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/app/controllers.go:83 +0x339\ngithub.com/fabric8-services/admin-console/vendor/github.com/goadesign/goa.(*Controller).MuxHandler.func1.1(0xc65e20, 0xc0004be720, 0xc637e0, 0xc00006f900, 0xc0004ca100, 0x0, 0x0)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/vendor/github.com/goadesign/goa/service.go:270 +0x9b\ngithub.com/fabric8-services/admin-console/vendor/github.com/fabric8-services/fabric8-common/log.LogRequest.func1.1(0xc65e20, 0xc0004be720, 0xc637e0, 0xc00006f900, 0xc0004ca100, 0xc0004be690, 0xc65e20)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/vendor/github.com/fabric8-services/fabric8-common/log/log_request.go:86 +0xd02\ngithub.com/fabric8-services/admin-console/vendor/github.com/fabric8-services/fabric8-common/token.InjectTokenManager.func1.1(0xc65e20, 0xc0004be660, 0xc637e0, 0xc00006f900, 0xc0004ca100, 0xc0004dde50, 0x0)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/vendor/github.com/fabric8-services/fabric8-common/token/token.go:373 +0x98\ngithub.com/fabric8-services/admin-console/vendor/github.com/fabric8-services/fabric8-common/goamiddleware.handler.func1(0xc65e20, 0xc0004be450, 0xc637e0, 0xc00006f900, 0xc0004ca100, 0x7, 0xc0000aac00)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/vendor/github.com/fabric8-services/fabric8-common/goamiddleware/jwt_token_context.go:48 +0x272\ngithub.com/fabric8-services/admin-console/vendor/github.com/fabric8-services/fabric8-common/metric.Recorder.func1.1(0xc65e20, 0xc0004be450, 0xc637e0, 0xc00006f900, 0xc0004ca100, 0xc0004e2451, 0xf)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/vendor/github.com/fabric8-services/fabric8-common/metric/recorder.go:24 +0xb1\ngithub.com/fabric8-services/admin-console/vendor/github.com/goadesign/goa/middleware.Recover.func1.1(0xc65e20, 0xc0004be450, 0xc637e0, 0xc00006f900, 0xc0004ca100, 0x0, 0x0)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/vendor/github.com/goadesign/goa/middleware/recover.go:37 +0x93\ngithub.com/fabric8-services/admin-console/app.ErrorHandler.func1.1(0xc65e20, 0xc0004be450, 0xc637e0, 0xc00006f900, 0xc0004ca100, 0xc00004ca80, 0x0)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/app/error_handler.go:47 +0xb4\ngithub.com/fabric8-services/admin-console/vendor/github.com/goadesign/goa/middleware/gzip.Middleware.func2.1(0xc65e20, 0xc0004be450, 0xc637e0, 0xc00006f900, 0xc0004ca100, 0xc0003446a0, 0xc65e20)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/vendor/github.com/goadesign/goa/middleware/gzip/middleware.go:98 +0x3a3\ngithub.com/fabric8-services/admin-console/vendor/github.com/goadesign/goa/middleware.RequestIDWithHeaderAndLengthLimit.func1.1(0xc65e20, 0xc0004be420, 0xc637e0, 0xc00006f900, 0xc0004ca100, 0xc0004be390, 0xc65e20)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/vendor/github.com/goadesign/goa/middleware/request_id.go:63 +0x144\ngithub.com/fabric8-services/admin-console/vendor/github.com/goadesign/goa.(*Controller).MuxHandler.func1(0xc652a0, 0xc000257ce0, 0xc0004ca100, 0xc0004be390)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/vendor/github.com/goadesign/goa/service.go:303 +0x31e\ngithub.com/fabric8-services/admin-console/vendor/github.com/goadesign/goa.(*mux).Handle.func1(0xc652a0, 0xc000257ce0, 0xc0004ca100, 0x0)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/vendor/github.com/goadesign/goa/mux.go:59 +0x1c4\ngithub.com/fabric8-services/admin-console/vendor/github.com/dimfeld/httptreemux.(*TreeMux).ServeLookupResult(0xc0003b6a00, 0xc652a0, 0xc000257ce0, 0xc0004ca100, 0xc8, 0xc00032d280, 0x0, 0x0)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/vendor/github.com/dimfeld/httptreemux/router.go:247 +0x79\ngithub.com/fabric8-services/admin-console/vendor/github.com/dimfeld/httptreemux.(*TreeMux).ServeHTTP(0xc0003b6a00, 0xc652a0, 0xc000257ce0, 0xc0004ca100)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/vendor/github.com/dimfeld/httptreemux/router.go:268 +0xe3\ngithub.com/fabric8-services/admin-console/vendor/github.com/goadesign/goa.(*mux).ServeHTTP(0xc0003445e0, 0xc652a0, 0xc000257ce0, 0xc0004ca100)\n\t/tmp/go/src/github.com/fabric8-services/admin-console/vendor/github.com/goadesign/goa/mux.go:85 +0x4c\nnet/http.(*ServeMux).ServeHTTP(0x1125880, 0xc652a0, 0xc000257ce0, 0xc0004ca100)\n\t/usr/lib/golang/src/net/http/server.go:2361 +0x127\nnet/http.serverHandler.ServeHTTP(0xc0004e9040, 0xc652a0, 0xc000257ce0, 0xc0004ca100)\n\t/usr/lib/golang/src/net/http/server.go:2741 +0xab\nnet/http.(*conn).serve(0xc0003f3a40, 0xc65d60, 0xc00006f840)\n\t/usr/lib/golang/src/net/http/server.go:1847 +0x646\ncreated by net/http.(*Server).Serve\n\t/usr/lib/golang/src/net/http/server.go:2851 +0x2f5\n",
"status":"500",
"title":"Unknown error"
}
]
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.