Is there a way to verify file integrity of Microsoft Graph messages? - file

We are downloading Microsoft Graph messages using the dotnet SDK.
For Drive Items we are checking the file hash where possible to confirm the file integrity after download.
Is there an equivalent hash that we can use to verify messages we download have come through as expected?

The message resource type doesn't have any hash or size property. There is a MAPI canonical property PidTagMessageSize but it's only an approximate size.
To read the value of PidTagMessageSize
GET https://graph.microsoft.com/v1.0/me/messages/{message_id}?$expand=singleValueExtendedProperties($filter=id eq 'Long 0x0E08')&$select=id
From my testing the message size doesn't match the size of raw value of message returned by
GET https://graph.microsoft.com/v1.0/me/messages/{message_id}/$value
Resources:
PidTagMessageSize

Related

Using LDAP template to find certificate

Our organization stores signing certificates in Active Directory. We are using anonymous bind to search for them at a base DN (e.g. OU=MY ORG,dc=mydc,dc=org). I have been trying to use the Spring LdapTemplate to look them up, but no matter what method I use, I get the cryptic InterruptedNamingException.
Assuming a cert subject of cn=mycert.myorg.com
My code looks like this
LdapContextSource contextSource = new LdapContextSource();
contextSource.setUrl(String.format(LDAP_URL_FORMAT, ldapCertStoreParameters.getServerName(),
ldapCertStoreParameters.getPort()));
contextSource.setBase(ldapCertStoreParameters.getBaseDn());
contextSource.setAnonymousReadOnly(true);
contextSource.afterPropertiesSet();
LdapTemplate ldapTemplate = new LdapTemplate(contextSource);
ldapTemplate.setIgnorePartialResultException(true);
ldapTemplate.afterPropertiesSet();
X500Principal principal = x509CertSelector.getSubject();
Object obj = ldapTemplate.lookup(new LdapName(principal.getName()));
The X500 principal's name is the whole dn. cn=mycert.myorg.com,OU=MY ORG,dc=mydc,dc=org
I have also tried the search using just the cn.
We have verified that the DN exists on the server using Apache Directory Studio.
• I would suggest you to please remove the call altogether or set the ‘userSearchBase’ either to an empty String (“”) as per the given example in the below community thread: -
Configure Spring security for Ldap connection
As in the ‘AbstractContextSource’, set the base suffix from which all operations should origin. If a base suffix is set, you will not have to (and, indeed, must not) specify the full distinguished names in any operations performed. Since you specified the full DN for the userDN/filter, you must not specify the base.
AD servers are apparently unable to handle referrals automatically, which causes a ‘PartialResultException’ to be thrown whenever a referral is encountered in a search. To avoid this, set the ‘ignorePartialResultException’ property to true. There is currently no way of manually handling these referrals in the form of ‘ReferralException’, i.e., either you get the exception (and your results are lost) or all referrals are ignored (if the server is unable to handle them properly). Neither is there any simple way to get notified that a ‘PartialResultException’ has been ignored.
For more details regarding the LDAP template search for Active Directory stored certificates, kindly refer to the link below: -
https://docs.spring.io/spring-ldap/docs/current/apidocs/org/springframework/ldap/core/LdapTemplate.html
• Also, please try to refer to the below documentation for configuration of Springboot LDAP template configuration through certificates stored in Active Directory: -
https://www.baeldung.com/x-509-authentication-in-spring-security

Logic Apps - Iterate through Blobs on Azure storage

I have an Azure storage account with Input and Archive directories. I want to:
Check for new XML files in the Import folder.
Read the contents of any files and validate the data.
Rename the XML file and move it to the Archive folder.
I don't want to have to set up a Gateway as I would need to check it was secure. Therefore, I have set up a recurrence trigger to poll the directory. This is my logic app so far.
This is the output I get.
Here is the error message in full.
```{
"status": 400,
"message": "The specified resource name length is not within the permissible
limits.\r\nclientRequestId: f7ed6db1-6ee4-43a3-bd3a-796162f3a58c",
"error": {
"message": "The specified resource name length is not within the permissible limits."
},
"source": "azureblob-ne.azconn-ne-01.p.azurewebsites.net"
}
```
Check the blob connector reference you will find the problem, the Get blob content action ask the blob id and you pass the whole blob property json, that's why it show the error..
The right way is choose the blob id actually the blob path is acceptable. You could refer to my flow.

What is the maximum length of a parameter in loadrunner?

I am a beginner in loadrunner. I am working with Loadrunner 12.53. I have recorded one simple which will login to one application and Logout.(I recorded with user1 login id) I am testing it with different users say(user2, user3, user4,..., user10, user11). The script is passing successfully till user9 and it is failing from user10. I am getting below error: HTTP-Internal application error
The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'ClearCurrentUserFormApplication'. The input source is not correctly formatted.
All the users are existed in that application. Is it because of the change in length of the parameter?
Record your site with User 10 settings. Compare to a recording for User9. The differences in structure will need to be addressed

How to get the attached file of a received mail using python and store it in a blob property field

I am trying to get the attached file from the received mail and store it as Blob property in the GAE datastore. I am using Google app engine Python.
The file should be added to datastore only if the file is a excel file. Following code shows the method i have used for this. In that class 'mail_message.attachments' will give a list of attachments of the received mail. From that we can get only the file name and file content . But here i have to get the format of the file for checking whether it's a excel file. so that's why i have used the following method.
class LogSenderHandler(InboundMailHandler):
def receive(self, mail_message):
file_format_supported=['application/vnd.openxmlformatsofficedocument.spreadsheetml.sheet','application/vnd.ms-excel']
for payload_no in range(len(mail_message.original.get_payload())):
one_payload = mail_message.original.get_payload(payload_no)
if one_payload.get_content_type() in file_format_supported:
uploadfile=Files()
uploadfile.temp_file=one_payload
uploadfile.put()
this code gives me the error
Property temp_file must be convertible to a Blob instance (Blob() argument should be str instance, not instance)
what i want to do converting the payload type as "str instance" to store it as blob property.
**Is there any other method to find the file type after getting the attachment list using mail_message.attachments. File content got from this attachment list can be stored to GAE datastore as blob property after decoding **.

Opening/decrypting Webex Connect db3 file

So I have a lot of instant message logs/history that I want to back up from my chat client, Cisco WebEx Connect in Windows 7. These are stored under C:\Users\\AppData\Local\WebEx Connect\Archive and the file is called "myemailaddress".db3
After downloading SQLiteBrowser to open this file, I get the error:
SQLiteManager: Error in opening file "myfile".db3 - either the file is encrypted or corrupt
Exception Name: NS_ERROR_FILE_CORRUPTED
Exception Message: Component returned failure code: 0x8052000b (NS_ERROR_FILE_CORRUPTED) [mozIStorageService.openUnsharedDatabase]
The file isn't corrupted so I'm thinking perhaps it is encrypted in some way - opening the file in Notepad displays random characters like the following, with no recognisable text:
=¢^£ÍV¶»ñû‡«–
`×ÚµÏýº°ÎîÎL
Besides that file which contains the actual messages, there is another small 20kb file under the folder ConnectDB that has various config settings (such as create CacheTable) and it says on the first line (when opened in Notepad): "SQLite format 3" - so clearly this one isn't encrypted.
Is there any way to extract the data from the first file to something readable (ie, text)? It's only around 5MB in size so shouldn't be causing any memory issues.
Unfortunately I haven't found a way for decrypting this file, however if you're still able to access the messenger client and have a live account you can still export them person by person by clicking on the person in question (make sure you've got view offline people enabled if you're retriving offline user's chat history) > click on the history tab > click on "save as".
I hope this is of use to you.

Resources