Qradar directory access - python

I want to access the folder /store/ariel/events/payloads/ in the Qradar directories from the App editor. I am trying the os.path.exists however it returns false however, the folder exists as well as the path is located if I run the script in the linux kernel of the Qradar. I would really appreciate if anyone can guide me on how to access the directories from the Qradar App Editor.

Can't do it, unfortunately.
In QRadar, Apps can only interact with the rest of the deployment via API calls.
The App Framework guide can provide some more details about what's available to App developers.

Related

Build definition for Django app in VSTS

I'm looking for a functional build definition for a Django 2.0.5 app in Visual Studio Team Services.
What I'm trying to do is deploying my Django application to Azure App Services trough CI/CD, and the process is running well (I mean, the files is being traspased to production), but, for some reason, my app doesn't starts and I'm getting a lot of errors. I guess I'm traspassing the wrong files, but I really don't know it.
Can someone please tell me what did you do to build a Django app with CI/CD in VSTS?
EDIT:
What I'm doing is use a default build definition for Python called "Python package", but customized. In one of the build steps, it calls to "setup.py" file. I created the file in the root folder of my repository, and I wrote the next code:
import os
import shutil
from distutils.dir_util import copy_tree
if not (os.path.exists('./dist')):
os.makedirs('dist')
else:
shutil.rmtree('./dist')
copy_tree(".", "./dist")
Ok, I know the code is ugly, and I need to write it in a better way, but is functional and it copy the entire project structure into the "./dist" directory. Later, the release proccess takes all these files and copy it to production environment. All this works Ok, but my app never starts. When I try to navigate my url, I receive a 404 error, and can't use any of the project routes.
Hope it helps, if not, I will put all the necessary details, thank's again.
Finally I found the problem. I didn't traspased the environment folder, and I has missed web.config file too.
Uploading the env folder and the web.config file fix the application.
ref: https://github.com/azureappserviceoss/djangoapp

Configuring Google App Engine Python runtime on IntelliJ

I can't seem to be able to add the Google App Engine Python runtime on IntelliJ. I tried to add an additional Python SDK and configure my project to use that, but I can't find the correct Python runtime to point to.
Note that I'm not interested in using the PyCharm IDE, and want to maintain the polyglot IntelliJ IDE setup.
My setup:
IntelliJ Ultimate 13.1
Python plugin
Google App Engine Plugin
Google Cloud SDK
Relevant links:
https://cloud.google.com/sdk/
http://plugins.jetbrains.com/plugin/?id=631
https://www.jetbrains.com/pycharm/quickstart/appengine_guide.html
You probably solve this task and find right approach for you.
I'll just add my solution for this task for IntelliJ 2016 and later, probably earlier version too.
At first, I advise you to crate virtualenv. And install gcloud and Google App Engine itself using cloud toolkit.
Next, open in IDE your project by selecting proper folder.
Go to File > Project structure (Mac) and in Project Settings section > Project, in Project SDK drop-down choose /or set your newly crated virtualenv.
After that, go to Modules in the same section, and hit + sign. Choose New Module from context menu. Go to Python section, and there mark Google App Engine (Python) checkbox. Set your Application ID in proper field beneath checkbox list, and choose path to Google App Engine SDK. If you set SDK trough gcloud toolset, you can get right path by using gcloud info command in console by your favour. Path that you are looking for is Installation Root and add /platform/google_appengine to it.
Congratulations. You are good to go!

Python App Engine SDK only loads default module

I have an App Engine app contains 3 modules and a dispatch.yaml. It works perfectly in production, however on the dev server (using GAE Launcher) only the default module is loaded.
The command which is run by the launcher:
Running command: "['D:\\Python27\\pythonw.exe', 'D:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=10081', '--admin_port=8002', 'D:\\path\\to\\my\\app']"
I know that when running dev_appserver.py using the command line it is possible to specify all modules as arguments. Is there a way of doing it when using the Launcher?
I believe this is done the same way as you do for an IDE like PyCharm, where you pass the yaml files (for each module) in the Extra Flags section.
Double-click the instance in App Engine Launcher
Under Extra Flags, add all the yaml files for your modules, separated by a space "app.yaml app2.yaml app3.yaml"
Bardia's answer is correct. However, after experiencing the problem myself and speaking with a GAE support engineer, I've added some further details. This information is currently missing from the official GAE documentation, but Google are planning to add it soon.
To use Google App Engine Launcher to 'Run' or 'Deploy' an application that uses modules you first need to:
Double click the application in Google App Engine Launcher, to bring up the Application Settings window.
Under Extra Flags, list the yaml files separated by spaces. Specify the full file path. If you are using a routing file, dispatch.yaml, list it first. Don't include app.yaml as this is already included by default.
e.g. /Users/.../dispatch.yaml /Users/.../app2.yaml /Users/.../app3.yaml
There is also a blog post, which explains how to do it, here:
http://www.shiftedup.com/2014/11/11/running-modules-locally-using-the-googleappenginelauncher-application
Update
Yaron commented that this method only works when you click the 'Run' button to run on localhost, but it doesn't work when you click 'Deploy' to deploy to production. I checked and I had the same problem, so I contacted Google support. They advised me that Google App Engine Launcher is now archived and is no longer supported. Instead we should use the new 'gcloud preview app deploy' command.
To deploy multiple modules, type the following into the command line:
gcloud preview app deploy ~/my_app/app.yaml \
~/my_app/another_module.yaml
Which is a shame, because I quite liked Google App Engine Launcher.

Noob questions about upload & security

I have the myapp.py and app.yaml in my windows C:\myap directory. The docs say to use:
appcfg.py update myapp/
to upload the app.
I've downloaded/installed Python and the Google python kit.
Sorry, for these noobish questions, but:
Is the myapp/ listed above refer to c:\myapp on my windows machine? Or is it the name of my app on the google side?
How/where do I type the appcfg.py to upload my directory?
Are there any security issues associated with using my gmail account and email address?
I'd like anybody from Second Life to be able to call this from in-world. There will be about a dozen calls a week. Are they going to have to authenticate with my email/password to use it?
Thanks for any help you can provide!
Since you have app in C:\myap you need to run appcfg.py update C:\myap. It's just a path to you app on your machine.
In windows command line. For example, "C:\Program Files (x86)\Google\google_appengine\appcfg.py" update C:\myap
No, appcfg uses SSL while uploading. It's safe.
If you mean to call application uploading - it's not really safe. I don't know why you need this. You can add app developers in App Engine admin console, so they will be able to deploy application from their accounts.

Working locally on web-application

I have been added as developer on application.
On Applications Overview this app is shown together with my other app, that I can freely access and change via Google App Engine Launcher.
Question is how to get app I'm supposed to work on my computer locally(in other words in GAE), so I can test and change it locally in the browser on my computer...
Windows 7
App Engine SDK-release: "1.7.6"
API: python27
You can use the appcfg application (the one that handle uploads) to download the source code.
This only works if the administrator has not disabled it.
However, it would be better to ask the developpers to provide you with the original source code !

Categories

Resources