How to pass authentication in GST Launch? - gstreamer

I am passing User name and password in the URI. But, I am getting Unauthorized Error. I followed this doc https://developer.ridgerun.com/wiki/index.php?title=GstRtspSink_-_Basic_Authentication. According to the documentation, I can send uername and password in URI. It's working for VLC but not for GST launch.
For VLC:
vlc rtsp://user:pass#127.0.0.1:7001/camera-id
For GST-Launch:
gst-launch-1.0 rtspsrc location="rtsp://user:pass#127.0.0.1:7001/camera-id"
Error:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://user:pass#127.0.0.1:7001/camera-id
Progress: (open) Retrieving server options
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Not authorized to access resource.
Additional debug info:
gstrtspsrc.c(5623): gst_rtspsrc_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Unauthorized
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
How to pass authentication in GSt Launch?
I can provide more details if you have anything from my side
Any help would be appreciable.

From gst-inspect-1.0 rtspsrc:
user-id : RTSP location URI user id for authentication
flags: readable, writable
String. Default: null
user-pw : RTSP location URI user password for authentication
flags: readable, writable
String. Default: null

Related

Unreal Engine: I cant login with EOS

I am giving a shot at trying out EOS. I am running into an error while trying to log in. I have a product and application set up in the online dev portal. Dont know if I have everything right though. I entered all the IDs and secret values into their appropriate places in the EOS plugin area in settings.
I have this in my DefaultEngine.ini
[OnlineSubsystemEOS]
bEnabled=true
[OnlineSubsystem]
DefaultPlatformService=EOS
[/Script/Engine.GameEngine]
+NetDriverDefinitions=. (DefName="GameNetDriver",DriverClassName="OnlineSubsystemEOS.NetDriverEOS",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[/Script/OnlineSubsystemEOS.NetDriverEOS]
bIsUsingP2PSockets=true
And this is how I am logging in
FOnlineAccountCredentials Credentials;
Credentials.Id = FString();
Credentials.Token = FString();
Credentials.Type = FString("accountportal");
Identity->OnLoginCompleteDelegates->AddUObject(this, &UEOSLibrary::OnLoginComplete);
Identity->Login(0, Credentials);
When I hit login I get a webpage that opens and asks if I want to allow access. I hit accept and what happens is the callback is never called to indicate completion. And the logs indicate that I might be missing something. What verification code and where??
LogEOSSDK: LogEOSAuth: NewClientToken: Client ClientId: xyz...kJK Access[Expires: 2022.02.22-22.32.12 Remaining: 7200.67] State: Valid
LogEOSSDK: LogEOSAuth: xyz...kJK result: eyJ...cwQ
LogEOSSDK: LogEOSAuth: Launching platform browser for account portal
LogEOSSDK: Warning: LogEOS: Error response received from backend. ServiceName=[OAuth], OperationName=[TokenGrant], Url=[<Redacted>], HttpStatus=[400], ErrorCode=[errors.com.epicgames.account.oauth.authorization_pending], NumericErrorCode=[1012], ErrorMessage=[The authorization server request is still pending as the end user has yet to visit and enter the verification code.], CorrId=[EOS-cuMGvKq4S3GvWUBNVjIbnw-ZJtD_z3YTx62TxiNJ8Yr2g-ug4LfijbR8Cx2eeMp7E3fA]
LogEOSSDK: LogEOSAuth: NewUserToken: User ClientId: xyz...kJK AccountId: 5f2...f59 Access[Expires: 2022.02.22-22.32.23 Remaining: 7200.31] Refresh[Expires: 2022-08-21T20:32:23.313Z Remaining: 15552000.31] State: Valid
LogEOSSDK: LogEOSAuth: GenerateUserAuth success
LogEOSSDK: LogEOSAuth: login/queryuserinfo success
LogEOSSDK: LogEOSAuth: Login Tasks Complete: 0
LogEOSSDK: LogEOSPresence: Updating Presence to Online. LocalUserId=[5f2...f59] RichText=[]
Turns out you cant be running the game for it to work. Which is what I was doing. Running as a standalone game I was able to successfully log in.

SAML error with Kubernetes: ‘InResponseToField of the Response doesn’t correspond to sent message’

I am having a recurring issue with shinyproxy (currently 2.5.0 - based on Springboot) hosted within a kubernetes cluster (currenty a single node). I'm using Auth0 with SAML. Traffic goes through a Nginx ingress controller that does TLS termination and has a fairly basic configuration. What I don't understand is that I will get the following error, but only once in a while. If I try to login, I will get the error, but then after that, if I go back to the login page and try to log in again, everything works fine.
o.s.security.saml.log.SAMLDefaultLogger : AuthNResponse;FAILURE;[Auth0 URN];;;org.opensaml.common.SAMLException: InResponseToField of the Response doesn't correspond to sent message a12g399012cidi7i2i3ha3ha4h6e6jc
at org.springframework.security.saml.websso.WebSSOProfileConsumerImpl.processAuthenticationResponse(WebSSOProfileConsumerImpl.java:175)
at org.springframework.security.saml.SAMLAuthenticationProvider.authenticate(SAMLAuthenticationProvider.java:88)
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:199)
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:219)
...
This made me think of a cookies problem, however adjusting the shinyproxy server/proxy configuration for cookies did not change anything. Shinyproxy configuration has:
server:
secure-cookies: true
proxy:
same-site-cookie: None
In the browser when I try to log in I get the following error message:
Error
Status code: 200
Message: Error validating SAML message
Stack Trace:
org.springframework.security.authentication.AuthenticationServiceException: Error validating SAML message
...
Anyone has an idea of what I am missing? I would really appreciate it! Thank you!

Net::SMTPAuthenticationError exception with capistrano and puma

I deployed my server with capistrano 3 and runs in puma.
Everyhting works well except mailing.
When I tried to send an email via webform, I got the following exception.
However, I can sucessfully send mail under rails console.
There is no typo on password or api key, because I sent mails via the console sucessfully
Any suggestion to get more debug information, I don't know how to get further information.
I, [2015-08-27T05:47:07.691835 #14686] INFO -- : Completed 500 Internal Server Error in 2627ms
F, [2015-08-27T05:47:07.693123 #14686] FATAL -- :
Net::SMTPAuthenticationError (535 5.7.0 Mailgun is not loving your login or password
):

Authentication error sending messages to Windows Service Bus 1.0 on AWS

I am trying to send and receive messages from a local workgroup machine (Windows 7), call it the 'client', to Service Bus 1.0 set up on a workgroup server (hosted on AWS EC2). After many trials and research I'm unable to send messages from the client machine to the server. I've followed a number of articles that appear to indicate that it is possible to do, but I cannot resolve the authentication issue I'm seeing.
Connecting to Windows Server Service Bus on AWS
Microsoft Service Bus on a Windows Workgroup
I note the Microsoft system requirements appears to indicate that it is "not supported" and "not possible". My question is can this be done, and has anyone had success? Any help would be greatly appreciated.
msdn.microsoft.com/en-us/library/windowsazure/jj193011(v=azure.10).aspx
My attempts include using either the WindowsTokenProvider and OAuthTokenProvider. I get the same result:
System.UnauthorizedAccessException: The token provider was unable to provide a security token while accessing 'https://xx.xx.xx.xx:9355/ServiceBusDefaultNamespace/$STS/Windows/'. Token provider returned message: ''. ---> System.IdentityModel.Tokens.SecurityTokenException: The token provider was unable to provide a security token while accessing 'https://xx.xx.xx.xx:9355/ServiceBusDefaultNamespace/$STS/Windows/'. Token provider returned message: ''. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
The Service Bus namespace is set up with AddressingScheme "Path" for a workgroup install. And the client side connection string includes the IP to reach the server, and I've set a RemoteCertificateValidationCallback before creating the queues.
Endpoint=sb://xx.xx.xx.xx/ServiceBusDefaultNamespace;StsEndpoint=https://xx.xx.xx.xx:9355/ServiceBusDefaultNamespace;RuntimePort=9354;ManagementPort=9355;WindowsUsername=SBUser;WindowsDomain=[NotUsed];WindowsPassword=[Password]
Code to attach to the remote queue and send a message is as follows:
ServiceBusConnectionStringBuilder connBuilder = new ServiceBusConnectionStringBuilder(ConfigurationManager.AppSettings["Microsoft.ServiceBus.ConnectionString"]); // Gets the connection string above
TokenProvider tokenProvider = WindowsTokenProvider.CreateWindowsTokenProvider(connBuilder.StsEndpoints, new NetworkCredential(connBuilder.WindowsCredentialUsername, connBuilder.WindowsCredentialPassword));
MessagingFactorySettings messagingFactorySettings = new MessagingFactorySettings();
messagingFactorySettings.TokenProvider = tokenProvider;
MessagingFactory messagingFactory = MessagingFactory.Create(connBuilder.GetAbsoluteRuntimeEndpoints(), messagingFactorySettings);
requestQueue = messagingFactory.CreateQueueClient("RequestQueue");
...
requestQueue.Send(sendMessage); // Fails here
The server account is SBUser with a password and I have left the domain/host specified blank on the token provider. I note that the Event Viewer on the server shows the authentication being attempted is the client's user account not the one from the token provider. Why is this? I'm obviously missing something in order to authenticate on the server.
An account failed to log on.
Subject:
Security ID: NULL SID
Account Name: -
Account Domain: -
Logon ID: 0x0
Logon Type: 3
Account For Which Logon Failed:
Security ID: NULL SID
Account Name: [ClientLogin]
Account Domain: [ClientMahcine]
Failure Information:
Failure Reason: Unknown user name or bad password.
Status: 0xc000006d
Sub Status: 0xc0000064
Appreciate any help. Thanks.
Try with the OAuthTokenProvider and make sure that connBuilder is passing the right values.
TokenProvider tokenProvider = TokenProvider.CreateOAuthTokenProvider (connBuilder.StsEndpoints, new NetworkCredential(connBuilder.WindowsCredentialUsername, connBuilder.WindowsCredentialPassword));
Once you try this, please, reply with the exception you get in your client. Also, in the server, search for a event in the Service Bus section that would give more details about the exception.
With that information we should continue to the next step.
Did you get to the bottom of this?
I have managed to get around the exact same issue by setting the Fully Qualified domain name of the server that the certificate is bound to in the client machine hosts file.
So where you have entered the IP address in the connection string, you should instead enter 'AMAZONA-PQxxxxx'. And in your hosts file, have the 'AMAZONA-PQxxxxx' resolve to the IP address.
we had the same issues. Server W2k12R2, standalone, Workgroup; Client Windows 7, same Workgroup.
It's necessary to have the same user accounts on both systems. Looks like this is some kind of "authentication proxy stuff" running.
Take a look at the compatibility matrix mentioned above:
http://msdn.microsoft.com/en-us/library/windowsazure/jj193011(v=azure.10).aspx
Thank you,
Holger

How to send HTTP request with authentication basic?

I'm using SOCKET (WINSOCK2.H) to connect to IP camera.
After connect, I want to send the command "GET /nphMotionJpeg?Resolution=640x480&Quality=Standard HTTP/1.1\r\n\r\n" to get video stream.
But this command is not successful because the camera is protected by authentication basic.
Now, I want to insert into request command username and password but i don't know the syntax to do it.
the syntax is explained in the related wikipedia article: https://en.wikipedia.org/wiki/Basic_access_authentication