Automatizing controlling of Skype Linux UI application - qt

I am the author of project Sevabot http://sevabot-skype-bot.readthedocs.org/ - a Skype bot for Linux.
As the server installation is painful ( https://sevabot-skype-bot.readthedocs.org/en/latest/ubuntu.html ) I'd like to figure out how to make it simpler for the users to use the bot throught cloud deployments... to the point we can ask Skype username, password and some cloud service credentials and automatically deploy the bot to the customers on the virtual machine provider like Amazon EC2. We'd like to make the deployment possible in a such way that one doesn't need to run VNC just to connect your Xvfb to enter the Skype login on the first time.
One challenge is automatizing Skype Linux UI input (username, password). Skype does not seem to be an option to enter user credentials in automatized way from the command line. As far as I know the user interface is Qt based and you need some sort of robot to choose widgets and simulate keypresses and mouse.
I'd like to know what options there exist for controlling blackbox Linux UI applications and automatize actions for them?

Related

R - Clarifications on the expiration of Google's JSON tokens for the Gmail API if application is in "Testing" phase

BACKGROUND INFO
I have developed an application in R through the shiny package, and deployed it online through the shinyapps.io service.
Among its different functions, the shiny app can send emails (through my personal Google Account) to users if the fill a form. The emails are sent through the functionalities of the gmailr package, and to make it work I had to follow the procedure on the Google Cloud Platform to create a JSON token, configure the OAuth consent screen, and store the credentials I obtain in a folder of my R project. All the steps to this process are reported at the end of this GitHub issue I opened a while ago.
THE PROBLEM
The JSON token I generated on the Google Cloud Platform expires after some days.
After googling around, I noticed that this can happen if my "Application", on Google Cloud, is still in the Testing phase. First question about this statement:
What does it mean when Google refers, on the OAuth screen, as an Application in Testing phase? My application is already online on shinyapps.io, it's already functioning, and when I create a new token it can also send emails correctly (for a while).
In addition, on the Google's OAuth consent screen, I now have the possibility to "publish" such application. If I do that, the status changes as In production, and this message is displayed. Other questions:
What does it mean that the application will be available to everyone with a Google account? My application deployed on shinyapps.io doesn't require any login or any other data from the users, then what is this app they're talking about?
What will happen to users that try to connect to my application?
Are my credentials, as for example the JSON file, safe?
I know that there might be a lot of confusion in this post, but I am relly not an expert in this field, and so I am worried to make some mistakes.
Thanks a lot for your help!
The GMail API, OAuth and all, is typically meant to allow your app to send email on behalf of any user. It seems your use-case is a little different - you only ever need to connect one user: your own.
What does it mean when Google refers, on the OAuth screen, as an **Application in Testing phase? My application is already online on shinyapps.io, it's already functioning, and when I create a new token it can also send emails correctly (for a while).
I think you mostly answered this yourself in your further questions. Google thinks you're building an app that any GMail user can connect to, and so for security reasons, they want to differentiate between a test app and a production app. They don't necessarily know whether or not your app is published on shinyapps.io.
What does it mean that the application will be available to everyone with a Google account? My application deployed on shinyapps.io doesn't require any login or any other data from the users, then what is this app they're talking about?
I alluded to this earlier, but the GMail API is intended for apps that allow any GMail user to connect and manipulate their own email. Imagine a third-party email client, or similar. Again - Google's wording sounds a bit odd wrt your app since it doesn't fit that bill.
What will happen to users that try to connect to my application?
If you don't explicitly host your own server that implements OAuth with Google, then nobody can even try to connect. As long as you don't leak the shared secret from your Google Cloud Platform entry, you're safe.
Are my credentials, as for example the JSON file, safe?
Probably anyone with the JSON file can send email on your behalf. Marking your app as 'in production' will not change the security implications of your JSON file.
Unfortunately, Google has pretty tight security around their APIs nowadays. If you want to mark your app as "in production" you might open up a can of worms regarding "restricted scopes" (sending email counts as restricted). However, since you're using the JSON file instead full OAuth, I'm not sure if this applies to you. To my knowledge, you should be safe to try marking your app as "in production". Worst-case scenario, you might be able to weasel around the strict verification requirements by saying your app is "internal":
Internal Use: The app is used only by people in your Google Workspace or Cloud Identity organization. Note that your app will not be subject to the unverified app screen or the 100-user cap if it's marked as Internal.

AWS CloudWatch with mobile applications

I have a backend system built in AWS and I'm utilizing CloudWatch in all of the services for logging and monitoring. I really like the ability to send structured JSON logs into CloudWatch that are consistent and provide a lot of context around the log message. Querying the logs and getting to the root of an issue is simple or just exploring the health of the environment - makes CloudWatch a must have for my backend.
Now I'm working on the frontend side of things, mobile applications using Xamarin.Forms. I know AWS has Amplify but I really wanted to stick with Xamarin.Forms as that's a skill set I've already got and I'm comfortable with. Since Amplify didn't support Xamarin.Forms I've been stuck looking at other options for logging - one of them being Microsoft's AppCenter.
If I go the AppCenter route I'll end up having to build out a mapping of the AppCenter installation identifier and my users between the AWS environment and the AppCenter environment. Before I start down that path I wanted to ask a couple questions around best practice and security of an alternative approach.
I'm considering using the AWS SDK for .Net, creating an IAM Role with a Policy that allows for X-Ray and CloudWatch PUT operations on a specific log group and then assigning it to an IAM User. I can issue access keys for the user and embed them in my apps config files. This would let me send log data right into CloudWatch from the mobile apps using something like NLog.
I noticed with AppCenter I have to provide a client secret to the app, which wouldn't be any different than providing an IAM User access key to my app for pushing into CloudWatch. I'm typically a little shy about issuing access keys from AWS but as long as the Policy is tight I can't think of any negative side-effects... other than someone flooding me with log data should they pull the key out of the app data.
An alternative route I'm exploring is instead of embedding the access keys in my config files - I could request them from my API services and hold it in-memory. Only downside to that is when the user doesn't have internet connectivity logging might be a pain (will need to look at how NLog handles sinks that aren't currently available - queueing and flushing)
Is there anything else I'm not considering or is this approach a feasible solution with minimal risk?

Wrapper for Jupyter Notebooks

I would like to create a web app, let's call it JupyterFrontend, that serves as a wrapper for jupyter notebooks. The main functionality of JupyterFrontend are as follows:
Authenticate users using a username and password combination
Create a Jupyter notebook session
Connect to a set of shared backend compute resources to execute the code
I would like to forward/share the Jupyter sessions of each user as a route/endpoint in my web app JupyterFrontend.
What's the best way to go about this?
How do I ensure that I can provide session persistence in this kind of architecture?
What you have explained is all possible using Jupyterhub.
There is an authentication class for Jupyterhub, which you can use a username password combination. Or any other authentication provider you can think of.
You can have multiple compute resources as the backend. Again, this is very flexible. You can have cloud resources, local network resources etc.

Are there APIs for skype for consumers rather than skype for business?

I basically want to read and write Skype messages. I am not having Skype for business and it seems that Skype desktop Apis is ceased. Is there any way to push and read messages in Skype programmatically.
Send message to a user and receive messages from a user programmatically via APIs from their desktop application. Say a script runs in the background and push messages at a given time to a certain user.
You can take a look at these:
Documentation
and this Gnoe Extension

Enabling Apple Push Notifications for ad hoc distribution environment

I have successfully implemented APN for development Environment. But i am facing problems while implementing the same for ad-hoc distribution environment.
Can anybody please suggest me do i need to create different App Id , Certificate and Provisioning Profile for that?
And is there any change in Sandbox?
A tutorial of steps will be very much appriciated.
Thanks
Saleel Karkhanis
For Adhoc distribution, Please follow the instructions below:
In Provisioning Portal, Create a Distribution certificate.
Get the "Device ID" of the iPhone that you intend to use for testing. Open iTunes -> Connect your device -> Select your device -> In Summary Pane, Click on Serial Number label, it will change to identifier (40 Hex characters) -> Choose Edit, Copy.
In Provisioning portal, Go to Devices -> Add new Device -> Enter the copied Device ID and give it a name.
In Provisioning portal, Create a Distribution Provisioning Profile. (Go to Provisioning -> Distribution). For Distibution type , Check "AdHoc". Select the App Id, If you have a distribution certificate, it will automatically be selected here. Select the newly entered device and Submit. Download this Provisioning Profile.
In Xcode, Window -> Organiser. Click on Devices and select Library -> Provisioning Profiles. If you are the admin, then Clicking on Refresh should fetch the newly created provisioning profile. If not, Drag and Drop the Adhoc Provisioning Profile to this list.
In Xcode, in your project Build Settings -> Code Signing Identity -> Release section, Select "iPhone Distribution". For "Any iOS SDK", Select the newly created Provisioning Profile. It will be available in the list.
In Xcode, Product -> Archive. Once it finishes, Archiving, it will open the Archive window automatically. Select the project and click Distribute, In the Distribute window, Select "Save for Enterprise or AdHoc Deployment" -> Select the "Code Signing Identity" which corresponds to the new Provisioning Profile. Continue the process and this will create an ".ipa" file.
Send this .ipa file and the new provisioning profile for testing adHoc distribution.
How to load the adHoc distribution on the test device:
Open iTunes, Connect your test device.
Drag and Drop the new provisioning profile to iTunes.
Drag and Drop the .ipa file iTunes.
Sync ur device. This would load the app.
For Push Notifications to work on Adhoc distribution:
Use the production certificates.
Use production APN Host: gateway.push.apple.com
Use production APN Feedback Host: feedback.push.apple.com.
I had major problems with this as well. I had absolutely no errors in my code. I just never got a push notification on the phone in Ad Hoc.
It turns out that I had some sort of problem with my certificates. I created
I'm not really certain what the problem was, exactly, but I solved it by logging into my developer account as the team agent and recreating everything under that login. I had originally created the certificates as a team admin.
Your development mode may work just fine, since any team member can create development distribution profiles. But only certain team members can create distribution profiles. Have your team agent create everything and try it again.
There is a separate persistent connection to the push service for each environment (Development and Production). The operating system establishes a persistent connection to the sandbox environment for development builds; ad hoc and distribution builds connect to the production environment.
If you are using GCM. Go to your AppDelegate.swift. Find method: didRegisterForRemoteNotificationsWithDeviceToken and replace
registrationOptions = [kGGLInstanceIDRegisterAPNSOption:deviceToken,
kGGLInstanceIDAPNSServerTypeSandboxOption:true]
with
registrationOptions = [kGGLInstanceIDRegisterAPNSOption:deviceToken,
kGGLInstanceIDAPNSServerTypeSandboxOption:false
In addition to Sushma Satish's answer ,
When you change certificates from developement to distributon , the device token generated for your phone is different.
So make sure you're changing the device token on the server.

Resources