Giter VIP home page Giter VIP logo

Comments (6)

caronc avatar caronc commented on August 22, 2024

See the APPRISE_CONFIG_LOCK documented in the README.md file.

This pairs with the apprise:// which i think gets you what you want?

from apprise-api.

and-win avatar and-win commented on August 22, 2024

Hello, Chris

Thank you for the response!
APPRISE_CONFIG_LOCK looks like what I need to protect configuration. I will check documentation more detailed.
But, it's not clear for me how to use apprise://.
I need just one instance of apprise and ability to communicate with it through REST API.
For example a micro-service use curl to notify a team about something like:
curl -X POST -d "body=notify team, tag=devops, token=xxxx" https://my_apprise_url/{key}
Where token is a secret used to access {key} of the team.

Could you please also clarify the way to combine tags with each other?

For example:

devops=slack://{tokenA}...
dev=slack://{tokenA}
pm=slack://{tokenA}
tech=[devops,dev] # tech should include devops and dev tags.

from apprise-api.

caronc avatar caronc commented on August 22, 2024

The config would look like:

tech,devops=slack://{tokenA}...
tech,dev=slack://{tokenA}
pm=slack://{tokenA}

The above tags your urls so that you can access them individually, or group the first 2 as tech

You're Apprise configuration needs to just point to your API;

# just notify the tech group:
apprise -vvv -t title -b body "apprise://your.apprise.api/token?tags=tech"

You could also make a ~./apprise file (on your local pc) that looks like:

# local configuration 
dev=apprise://your.apprise.api/token?tags=dev
tech=apprise://your.apprise.api/token?tags=tech
dev=apprise://your.apprise.api/token?tags=dev
pm=apprise://your.apprise.api/token?tags=pm

Then you can just run:

apprise -vvv -t title -b body -g tech

It's a bit counter intuitive, but prevents exposing your credentials to users.

If you don't use the APPRISE_CONFIG_LOCK, you're local Apprise configuration file (~./apprise) just becomes:

# local configuration 
include http://your.apprise.api:8000/get/token

from apprise-api.

and-win avatar and-win commented on August 22, 2024

Chris, thank very much!

In your example I need two instances of apprise: an API server and apprise client on the sender's side, correct?

# just notify the tech group:
apprise -vvv -t title -b body "apprise://your.apprise.api/token?tags=tech"

I consider Apprise like a notification gateway. I need just one Apprise API server, which is accessible for clients through REST API. And looking for a solution to protect endpoints URLs by some secret token.
On the side of Apprise API server I have several preconfigured keys according to each team:
apprise.api:8000/teamDevops
apprise.api:8000/teamSecurity
The goal is protect team's endpoint from each other. Team Devops has access to key 'apprise.api:8000/teamDevops', but does not have access to apprise.api:8000/teamSecurity.
Is there a way to protect teams endpoints without additional wrappers like Nginx?

from apprise-api.

caronc avatar caronc commented on August 22, 2024

Just focus on the api part of my response and i think it will achieve what you want 🙂🚀

from apprise-api.

and-win avatar and-win commented on August 22, 2024

Will try, thank you for your work and responses!

from apprise-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.