owncloud / ocis-wopiserver Goto Github PK
View Code? Open in Web Editor NEW:atom_symbol: ownCloud Infinite Scale WOPI server
License: Apache License 2.0
:atom_symbol: ownCloud Infinite Scale WOPI server
License: Apache License 2.0
This assumption breaks our deployment and we cannot test the application.
[15:02][root@cbox-ocisdev-03 (ocis_dev:box/ocis) ocis-wopiserver]# grep -ri '/home' .
./ui/app.js: axios.get(tokenUrl, { params: { filePath: '/home' + filePath, fileId: fileId } })
The request should be send to: /eos/user/g/gonzalhu/...
but is sent to /home/eos/user/g/gonzalhu/...
This applies to any application/extension.
The application needs to use the configured webdav namespace.
The UI knows the good namespace as when clicking on "All files" the request is correct.
This boils down to harcoded paths in the app.
@kulmann could you point @wkloucek to the magic variable that encapsulate the files namespace so is used instead of /home
?
When the http or grpc address is already been used by the system (or by other extensions) an clear error message stating that a network cannot be bind on such network is shown in the logs.
However, for the debug address no error is shown. Only a info message saying "Shutting down sever".
It took me a while to backtrace the error.
{"level":"info","service":"wopiserver","transport":"http","addr":"localhost:9505","time":"2021-06-21T15:41:05+02:00","message":"starting server"}
{"level":"info","service":"wopiserver","transport":"debug","addr":"0.0.0.0:9109","time":"2021-06-21T15:41:05+02:00","message":"starting server"}
{"level":"info","service":"wopiserver","transport":"http","time":"2021-06-21T15:41:05+02:00","message":"Shutting down server"}
When binding the server to 0.0.0.0
is gives the following error:
ocis-wopiserver server --http-addr 0.0.0.0:1111
{"level":"error","service":"wopiserver","error":"address ::1:1111: too many colons in address","transport":"http","time":"2021-06-21T11:10:23+02:00","message":"Failed to start server"}
When running with localhost it works:
ocis-wopiserver server --http-addr localhost:1111
Extracted from #10. Minting tokens is expensive and if it can be avoided, it should. If another service already spent the time minting a token and handing it over to subsequent services, let's save the overhead of minting a new token and instead use the one we have in the context of the request.
// TODO: if CS3org WOPI server mints the final REVA JWT secret,
// the temporary REVA JWT token and the user display name can also be obtained like that:
//
// revaToken = r.Header.Get("X-Access-Token") // reva token minted by oCIS Proxy
// if revaToken == "" {
// return "", "", errors.New("unauthenticated request")
// }
//
// type revaClaims struct {
// User *user.User `json:"user,omitempty"`
// jwt.Claims
// }
//
// var claims revaClaims
//
// //decode JWT token without verifying the signature
// tokenErr := errors.New("request provided malformed access token")
// token, err := jwt.ParseSigned(revaToken)
// if err != nil {
// return "", "", tokenErr
// }
// err = token.UnsafeClaimsWithoutVerification(&claims)
// if err != nil {
// return "", "", tokenErr
// }
//
//username = claims.User.DisplayName
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.