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

feat: Generate + store station_id keypair and pass to Zinnia via env var #406

Closed

Conversation

PatrickNercessian
Copy link
Contributor

@PatrickNercessian PatrickNercessian commented Apr 12, 2024

Copy link

socket-security bot commented Apr 12, 2024

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] Transitive: environment, filesystem, network, shell +38 1.25 MB shiftkey

View full report↗︎

Copy link

socket-security bot commented Apr 12, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/[email protected]

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

@juliangruber juliangruber marked this pull request as draft April 15, 2024 07:08
Copy link
Member

@juliangruber juliangruber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work so far, @PatrickNercessian! 👏

@PatrickNercessian PatrickNercessian changed the title Generate and store station_id Ed25119 keypair and pass to Zinnia via … Generate and store station_id keypair and pass to Zinnia via env var Apr 15, 2024
@PatrickNercessian PatrickNercessian changed the title Generate and store station_id keypair and pass to Zinnia via env var Feat: Generate + store station_id keypair and pass to Zinnia via env var Apr 15, 2024
@PatrickNercessian PatrickNercessian marked this pull request as ready for review April 17, 2024 22:26
@bajtos
Copy link
Member

bajtos commented Apr 18, 2024

@PatrickNercessian would you mind adding Station ID to the ping telemetry points?

https://github.com/filecoin-station/core/blob/f8fd023d90715202ef5d23d253776b8036ee6456/lib/telemetry.js#L52-L56

Proposed change in commands/station.js

-  startPingLoop().unref()
+  startPingLoop({ STATION_ID }).unref()

Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻

@juliangruber: Could you please check the new keytar interaction when both Desktop and Core read from the keychain at startup?

@juliangruber
Copy link
Member

Tested and works 👍

@bajtos
Copy link
Member

bajtos commented Apr 22, 2024

@SocketSecurity ignore npm/[email protected]

@juliangruber juliangruber enabled auto-merge (squash) April 22, 2024 14:22
@bajtos

This comment was marked as resolved.

@bajtos
Copy link
Member

bajtos commented Apr 22, 2024

The builds are failing on Linux now.

[Error: The name org.freedesktop.secrets was not provided by any .service files]
node:internal/modules/cjs/loader:1465
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: libsecret-1.so.0: cannot open shared object file: No such file or directory
    at Module._extensions..node (node:internal/modules/cjs/loader:1465:18)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/usr/src/app/node_modules/keytar/lib/keytar.js:1:14)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12) {
  code: 'ERR_DLOPEN_FAILED'
}

Signed-off-by: Miroslav Bajtoš <[email protected]>
@bajtos bajtos disabled auto-merge April 22, 2024 15:12
@bajtos bajtos changed the title Feat: Generate + store station_id keypair and pass to Zinnia via env var feat: Generate + store station_id keypair and pass to Zinnia via env var Apr 22, 2024
@bajtos
Copy link
Member

bajtos commented Apr 22, 2024

I added 0fe59a9 to install libsecret required by node-tar.

We are getting a different error now:

[Error: Object does not exist at path “/org/freedesktop/secrets/collection/login”]

@PatrickNercessian could you please look into this yourself?

Maybe we can copy the setup steps from keytar's CI, see the following two blocks:

That code is more than two years old; there may be easier options available by now. Feel free to use a different approach to fix this problem!

@juliangruber
Copy link
Member

See PatrickNercessian#1

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

Successfully merging this pull request may close these issues.

3 participants