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

Collaboration service - envvar issues #9058

Open
mmattel opened this issue May 3, 2024 · 2 comments
Open

Collaboration service - envvar issues #9058

mmattel opened this issue May 3, 2024 · 2 comments

Comments

@mmattel
Copy link
Contributor

mmattel commented May 3, 2024

While adding the collaboration service to the admin docs which was a neccessity to get an error free build, I stumbled over some envvar related things that need a change. As reference how it is currently rendered, see the admin docs:

  • The sort order of items is not inline with other serices.
    We have for example in all other services logging, tracing or debugging on top but here it is at the bottom.
  • COLLABORATION_JWT_SECRET (OCIS_JWT_SECRET)
    This envvar has a string defined, normally we have this empty, see all other services using OCIS_JWT_SECRET. If a value must be populated, we need to reflect this in the description and in the requirements of the readme.
  • The default for COLLABORATION_APP_LOCKNAME --> com.github.owncloud.collaboration looks strange.
  • I doubt for the COLLABORATION_APP_ICON that both the default image-edit and the description Icon for the app are correct. Imho the default should be empty and the description adapted to define a path to an icon using $OCIS_BASE_DATA_PATH/path as we have in many other services. For an example see the PROXY_TRANSPORT_TLS_CERT envvar.
  • Should'nt we add OCIS_GATEWAY_GRPC_ADDR to the COLLABORATION_GRPC_ADDR and use the default of the global envvar?
  • Many envvars need a much better and clearer description to make them also inline with other services..

@jvillafanez @micbar @dragonchaser

@jvillafanez
Copy link
Member

The sort order of items is not inline with other serices.

I think the items that need to be changed should be at the top, and items that are unlikely to be changed should be bottom. I'm quite convinced that people in general will look at the first 5-10 options before assuming that the rest are optional and don't need to be touched for an initial approach.
Anyway, consistency is also important.

COLLABORATION_JWT_SECRET (OCIS_JWT_SECRET)

I'm not sure if we can use an empty secret. The idea was to ensure that at least there is a secret available that can be overwritten if needed, so a random-generated secret is populated there early.
I need to check how other services are doing this, but I suppose we'll just need to move the generation of the secret to a different place.

The default for COLLABORATION_APP_LOCKNAME

This was copied from the original repo so I'm not sure if it needs a specific format or not. Maybe @wkloucek knows.

I doubt for the COLLABORATION_APP_ICON

Same

Should'nt we add OCIS_GATEWAY_GRPC_ADDR to the COLLABORATION_GRPC_ADDR and use the default of the global envvar?

The collaboration service starts a GRPC server that is connected to reva, so the address is for that service. It's also a bind address, so other services, in particular reva, can access to the collaboration service via GRPC.
I'm not sure how much ocis-related is that address because is linked to reva.

Side note, I'm not sure if we have a reference service. Except for the specific options for the service, most of the options have been copied from other services.

@micbar
Copy link
Contributor

micbar commented May 3, 2024

COLLABORATION_JWT_SECRET (OCIS_JWT_SECRET)

I think we need to use the global OCIS_JWT_SECRET together with the local variable

I'm not sure if we can use an empty secret. The idea was to ensure that at least there is a secret available that can be overwritten if needed, so a random-generated secret is populated there early.
I need to check how other services are doing this, but I suppose we'll just need to move the generation of the secret to a different place.

The jwt secret is randomized during ocis init.

Should'nt we add OCIS_GATEWAY_GRPC_ADDR to the COLLABORATION_GRPC_ADDR and use the default of the global envvar?

The collaboration service starts a GRPC server that is connected to reva, so the address is for that service. It's also a bind address, so other services, in particular reva, can access to the collaboration service via GRPC.
I'm not sure how much ocis-related is that address because is linked to reva.

Side note, I'm not sure if we have a reference service. Except for the specific options for the service, most of the options have been copied from other services.

We should add OCIS_GATEWAY_GRPC_ADDR to the COLLABORATION_GRPC_ADDR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants