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

Something wrong inside meshcentral-config-schema.json #5697

Closed
sammyke007 opened this issue Jan 15, 2024 · 10 comments
Closed

Something wrong inside meshcentral-config-schema.json #5697

sammyke007 opened this issue Jan 15, 2024 · 10 comments

Comments

@sammyke007
Copy link

sammyke007 commented Jan 15, 2024

Describe the bug
meshcentral-config-schema.json seems to be off somewhere as using this schema in VScode works in "settings" and eg. "smtp", but not for "domains"

I use this schema:
"$schema": "https://raw.githubusercontent.com/Ylianst/MeshCentral/master/meshcentral-config-schema.json",

To Reproduce
Steps to reproduce the behavior:

  1. Try to CTRL+space in the "domain" part and it won't tell you about the possible keys or try to hover over a key in the "domain" part and it won't show the description of the keys.

VScode 1.85.1
Windows 11

Working:
image

Not working:
image

@si458 as requested

@sammyke007 sammyke007 added the bug label Jan 15, 2024
@si458
Copy link
Collaborator

si458 commented Jan 15, 2024

weirdly enough,
create "domaindefaults": { }, above "domains": {
then CTRL+SPACE inside the brackets, and you get ALL the options?
the domaindefaults is so you can apply loads of values to different domains (if you are multi-tentant),
and all that does is reference whats inside domains?

@sammyke007
Copy link
Author

image

Still doesn't work over here...

@si458
Copy link
Collaborator

si458 commented Jan 15, 2024

who the hell knows with VSCode?
image

@si458
Copy link
Collaborator

si458 commented Jan 15, 2024

fixed for you 👍 1295af4
should be able to close VScode, reopen, let it read the json schema again as it should be pointing to the master anyways!
it was set as items which is for arrays!
properties and additionalproperties are for objects!

@sammyke007
Copy link
Author

sammyke007 commented Jan 15, 2024

Yes sir, that's OK!

One last small issue:
commented entries are "not allowed":

image

I guess
"additionalProperties": false,
needs to be true on line 1788?

@si458
Copy link
Collaborator

si458 commented Jan 15, 2024

erm ill have to look into that for you!
ive never designed a json schema before, all the new options ive put in, ive just copied n pasted from ones already in there!

EDIT: i think that must be a VScode thing, as i dont see that error here?

@sammyke007
Copy link
Author

Very strange. I can comment every line without errors, except in the "agentCustomization" part.

@si458
Copy link
Collaborator

si458 commented Jan 15, 2024

fixed, the was 33 extra additionalProperties listed in different places, so some worked and some didnt...

@si458 si458 closed this as completed Jan 15, 2024
@sammyke007
Copy link
Author

FIXED!

@si458
Copy link
Collaborator

si458 commented Jan 15, 2024

dont forget to donate https://www.si458.co.uk/2024/01/05/donation/ 🙏 ❤️

mstrhakr pushed a commit to mstrhakr/MeshCentral that referenced this issue Mar 2, 2024
Ylianst added a commit that referenced this issue Mar 4, 2024
* Create forksync.yml

* update oidc to use openid-client

* update oidc module requirements

* working oidc+

includes all oauth2 clients automatically migrated. azure will need some kind of fix for the uid

* update openid-client install checks

* created overarching schema for OIDC

* bug fixs for azure login

* update schema

prepare schema for unified oidc module

* update 'oidc' to strategy variable

* working azure+ groups

groups from azure are in,
you can use memberOf or transitiveMemberOf in config (Graphs API)

* clean up old config import + working google oidc

previous config map was recursive nonsense, changed to multiple IFs

* added convertStrArray

* de-expanded scope

put all other auth strategies back to normal and fixed oidc strategy

* swap back to using authlog debugger

* Update meshcentral-config-schema.json

* working google oidc + groups

* working azure+groups (again)

* init oidc docs

very incomplete but basic config is present

* add oidc

* more work on docs

* add scope and claim options

plus fixed a few bugs and faults in my logic
used logs correctly

* further cleanup debug

* more debug cleanup

* continue documentation push

fixed minor debug bugs also

* more work on docs

missing links, need to get azure preset docs, probably more.

* done with docs

its good enough for now

* minor fix + presets get correct icon

* fix google oidc not visible at login

* fix bug with emailVerified property

* fix logout bug + debug cleanup

* fix strategy logout bug +cleanup

* fixed preset login icon

* fix alert + fix schema

* terminate lines

* Dutch language update 1.0.85

line up polish translation

* Fixed guest web relay session revocation (#4667)

* Updated French translation.

* Add hook to allow adding custom api endpoints to Express routing

* Updated German translation.

* Update meshcentral-config-schema.json (change formatting)

This way it is easier to edit and maintain

* Fixed schema.

* fix meshcentral-config-schema.json

* add language selector to login (#5648)

* add language selector to login

* add showLanguageSelect to pick top or bottom boxe

* remove additionalProperties: false in schema to allow comments #5697

Signed-off-by: si458 <[email protected]>

* fix notes in docs

* Fix web relay session handling and redirection due to bad merge

* Added option to check HTTP origin.

* add links and fix typo

* move groups after strategy

* Update version split in docs

* Fix preset issuer URL in OIDC strategy

* Update clientid and clientsecret to client_id and client_secret

* Update meshcentral-config-schema.json and fix bad rebase

* Update meshcentral-config-schema.json

* fix bad rebase

* fix bad rebase

* Add 'connect-flash' to passport dependencies

* Remove unnecessary passport dependencies - fix bad rebase

* Fix auth strategy bug and remove console.log statement

* Set groupType to the preset name if it exists, otherwise use the strategy name

* remove finally block from

* Refactor authentication logging in handleStrategyLogin to include strategy name

---------

Signed-off-by: si458 <[email protected]>
Co-authored-by: petervanv <[email protected]>
Co-authored-by: Ylian Saint-Hilaire <[email protected]>
Co-authored-by: Martin Mädler <[email protected]>
Co-authored-by: Fausto Gutierrez <[email protected]>
Co-authored-by: Simon Smith <[email protected]>
wdlut pushed a commit to wdlut/MeshCentral that referenced this issue Mar 19, 2024
* Create forksync.yml

* update oidc to use openid-client

* update oidc module requirements

* working oidc+

includes all oauth2 clients automatically migrated. azure will need some kind of fix for the uid

* update openid-client install checks

* created overarching schema for OIDC

* bug fixs for azure login

* update schema

prepare schema for unified oidc module

* update 'oidc' to strategy variable

* working azure+ groups

groups from azure are in,
you can use memberOf or transitiveMemberOf in config (Graphs API)

* clean up old config import + working google oidc

previous config map was recursive nonsense, changed to multiple IFs

* added convertStrArray

* de-expanded scope

put all other auth strategies back to normal and fixed oidc strategy

* swap back to using authlog debugger

* Update meshcentral-config-schema.json

* working google oidc + groups

* working azure+groups (again)

* init oidc docs

very incomplete but basic config is present

* add oidc

* more work on docs

* add scope and claim options

plus fixed a few bugs and faults in my logic
used logs correctly

* further cleanup debug

* more debug cleanup

* continue documentation push

fixed minor debug bugs also

* more work on docs

missing links, need to get azure preset docs, probably more.

* done with docs

its good enough for now

* minor fix + presets get correct icon

* fix google oidc not visible at login

* fix bug with emailVerified property

* fix logout bug + debug cleanup

* fix strategy logout bug +cleanup

* fixed preset login icon

* fix alert + fix schema

* terminate lines

* Dutch language update 1.0.85

line up polish translation

* Fixed guest web relay session revocation (Ylianst#4667)

* Updated French translation.

* Add hook to allow adding custom api endpoints to Express routing

* Updated German translation.

* Update meshcentral-config-schema.json (change formatting)

This way it is easier to edit and maintain

* Fixed schema.

* fix meshcentral-config-schema.json

* add language selector to login (Ylianst#5648)

* add language selector to login

* add showLanguageSelect to pick top or bottom boxe

* remove additionalProperties: false in schema to allow comments Ylianst#5697

Signed-off-by: si458 <[email protected]>

* fix notes in docs

* Fix web relay session handling and redirection due to bad merge

* Added option to check HTTP origin.

* add links and fix typo

* move groups after strategy

* Update version split in docs

* Fix preset issuer URL in OIDC strategy

* Update clientid and clientsecret to client_id and client_secret

* Update meshcentral-config-schema.json and fix bad rebase

* Update meshcentral-config-schema.json

* fix bad rebase

* fix bad rebase

* Add 'connect-flash' to passport dependencies

* Remove unnecessary passport dependencies - fix bad rebase

* Fix auth strategy bug and remove console.log statement

* Set groupType to the preset name if it exists, otherwise use the strategy name

* remove finally block from

* Refactor authentication logging in handleStrategyLogin to include strategy name

---------

Signed-off-by: si458 <[email protected]>
Co-authored-by: petervanv <[email protected]>
Co-authored-by: Ylian Saint-Hilaire <[email protected]>
Co-authored-by: Martin Mädler <[email protected]>
Co-authored-by: Fausto Gutierrez <[email protected]>
Co-authored-by: Simon Smith <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants