Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easily Load Web Extensions #8392

Closed
13 tasks
tbsbdr opened this issue Feb 7, 2024 · 4 comments · Fixed by #8523
Closed
13 tasks

Easily Load Web Extensions #8392

tbsbdr opened this issue Feb 7, 2024 · 4 comments · Fixed by #8523
Assignees
Labels
Type:Story User Story

Comments

@tbsbdr
Copy link
Contributor

tbsbdr commented Feb 7, 2024

Description

User Stories

  • As an Sysadmin I want to add a web extension very easily so that I can enrich the functionality of the Web UI without much manual configuration.

Value

  • increase adoption of web apps and extensions

Acceptance Criteria

  • web service allows to load web apps from a dedicated, configurable apps folder
  • contents of the apps folder are a) app releases (.tar files) and b) optionally config snippets for the individual apps
  • web service extracts app releases at runtime and:
    • makes the contents available via http GET
    • inserts the apps into the config.json
  • mechanism to disable apps for the next service restart (e.g. with a file name prefix/suffix)
  • app signing for integrity check (followup?)

Context / history

Definition of ready

  • Everybody needs to understand the value written in the user story
  • Acceptance criteria have to be defined
  • All dependencies of the user story need to be identified
  • Feature should be seen from an end user perspective
  • Story has to be estimated
  • Story points need to be less than 20

Definition of done

  • Functional requirements
    • Functionality described in the user story works
    • Acceptance criteria are fulfilled
  • Quality
    • Code review happened
    • CI is green (that includes new and existing automated tests)
    • Critical code received unit tests by the developer
  • Non-functional requirements
    • No sonar cloud issues
  • Configuration changes
    • The next branch of the ocis charts is compatible
@tbsbdr tbsbdr added the Type:Story User Story label Feb 7, 2024
@micbar
Copy link
Contributor

micbar commented Feb 9, 2024

I would go for a "web" service based approach in the first iteration.

  • Add an extra config for an WEB_EXTENSIONS_PATH
    • add an extra route to the proxy as a web extensions-web prefix
    • add a mechanism to parse yaml files in the extensions to collect snippets for the merged config.json
    • add a signatures.json to every web extension (like oc10) and validate in the ocis web service

@fschade fschade self-assigned this Feb 20, 2024
@fschade
Copy link
Contributor

fschade commented Feb 22, 2024

@micbar, @kulmann, @tbsbdr

web service allows to load web apps from a dedicated, configurable apps folder is fine in my opinion but i have concerns regarding contents of the apps folder are a) app releases (.tar files) in combination with web service extracts app releases at runtime and:... could be a tar.BOMB 💣 💥

following suggestions:

  • ocis scans a folder at startup to obtain available web-apps (apps have to follow a strict format)
  • the whatever-app.tar.gz is not extracted automatically at runtime (or startup) , instead we add a cli admin command to load an app, which means:
    • the cli loads the app (filesystem, gitHub release, etc.)
    • the cli scans the app if the artifact's contain everything and are valid (integrity, structure, configuration)
    • the cli extracts the app to the destination folder which is exposed to the public and can be loaded by web

another topic regarding app configuration, if a app can change over time (new version, etc.) the contained config should not be changed (user edit), instead i recommend the following:

  • the app-name/config.json should not be edited and stays the same over time.
  • the user has to add the app config to OCIS_HOME/config/web.yaml
  • ocis merges OCIS_HOME/config/web.yaml and app-name/config.json together, YAML key values win.

@kulmann
Copy link
Member

kulmann commented Feb 22, 2024

I don't want to build a CLI in the first iteration. That's a UX improvement for small instance admins later on. Let's let the user unpack the app artifact (tarball) themselves.

@fschade
Copy link
Contributor

fschade commented Feb 25, 2024

@kulmann, @dragotin, @micbar, @tbsbdr ready for testing, please have a look and tell me if something is missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:Story User Story
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants