Comments (5)
Ah I see. Without creating your own simple server that validates encrypted keys and forwards calls to Google, I'm not sure how you can make this completely secure.
You could compile the key into the binary somehow but only if building manually, and it couldn't be built by mint. Even then someone clever could probably extract the key out of your binary if they wanted to, but that is probably hard enough that no-one would bother π
I'm not a security expert though so there might be another way to do what you're after
from mint.
Hi @shpakovski, glad you like it!
I'm not sure I 100% understand your question, but you would like to use some api keys in your swift command line tool right? I don't know if accessing them during mint install
is the best place, but rather in your executable itself when it runs.
There are various ways of accessing these in your command line tool, for example:
- passing by an argument (must be done everytime)
- an environment variable (can be setup within someones toolchain)
- have some file at a standard path that it reads from
- some way of saving and loading it within the tool, to local storage or preferably the keychain. Your command could ask for it interactively if it doesn't have the key yet, or require them to pass it in the first time.
Hope that helps, sorry if I've misunderstood your question.
from mint.
Yes, there is a bit of misunderstanding, sorry π
The thing is that I donβt want all customers of the CLI to generate their own API Keys in order to use the app. My command-line tool is similar to any mobile client: it runs the OAuth login page with a custom identifier and secret string to acquire the access token per device!
So those keys must be in the binary but not in the codebase πββοΈ Thanks again!
Update: Iβm talking about smth like this but for CLI: https://tgvashworth.com/2013/04/11/keeping-open-source-secrects.html How do I lend out my own keys to install the Swift app on any Mac?
from mint.
Right, the secret string should be in the binary but not in the codebase π
Without creating your own simple server that validates encrypted keys and forwards calls to Google.
This is probably a way to go, thanks a lot! I will just modify this approach a bit π
from mint.
Follow-up, if youβre curious: https://stackoverflow.com/questions/1983990/how-to-open-source-an-application-that-uses-api-keys I.e. such command-line tools should be distributed as binaries, so mint
is not suitable for such cases. I will use it next time though, thanks again! π
from mint.
Related Issues (20)
- Allow custom scripts in the Mintfile
- Running (or rather, building) swiftlint 0.50.0-rc.1 fails HOT 4
- Mint 0.17.3 isn't available on brew HOT 1
- i can't install mint HOT 5
- Cannot install IBLinter with latest Mint HOT 1
- `mint run`, but referring to SPM executable name, instead of GitHub repo name? HOT 1
- Support Artifact Bundle
- Cannot find bundle with Bundle.module HOT 5
- mint does not fail when Mintfile does not exists at the specified path HOT 2
- Enable locking versions in `Mintfile.lock` or sth similar HOT 4
- mint which usage HOT 1
- _InternalSwiftSyntaxParser (no such module '_InternalSwiftSyntaxParser')
- Mint doesn't install dependencies HOT 1
- add `cleanup` command
- Having an issue while installing mint on Mac M2 Pro HOT 5
- Add Swift 5.9 support HOT 2
- Can `mint run` be used without an internet connection? HOT 2
- Force mint run to use locally installed version HOT 4
- Brew version vs latest commit on repo are different. What's the plan?
- Installing from version ranges
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mint.