Understand the group id in google cloud storage acl "GroupById" - google-app-engine

In the acl file of the google cloud storage bucket, there are a few "GroupById" sections, how do we figure out which group they are really?
<?xml version="1.0" ?>
<AccessControlList>
<Entries>
<Entry>
<Scope type="GroupById">
<ID>00b4903a9723223d04b0b0f62a685816f6507795e4fd99efef36a2f1e6de00d7</ID>
</Scope>
<Permission>FULL_CONTROL</Permission>
</Entry>
<Entry>
<Scope type="GroupById">
<ID>00b4903a9790857bbc0cdcd793997d3cc14342d54187d1d541989da7e514fac2</ID>
</Scope>
<Permission>FULL_CONTROL</Permission>
</Entry>
<Entry>
<Scope type="GroupById">
<ID>00b4903a9765a87209b3e1452e437e7454c3af51863bdeff32e647151c238bda</ID>
</Scope>
<Permission>READ</Permission>
</Entry>
</Entries>
</AccessControlList>
I know one of them is probably an app engine. But I cannot figure it out.

These groups represents Project Team Members, Project Editors and Project Owners. By default these groups has the following permissions.
Project Team Members
READ
Project Editors
FULL_CONTROL
Project Owners
FULL_CONTROL
You can find these IDs along with the respective groups in Google APIs Console (here). Select your project and click on Google Cloud Storage item in the left-side menu. Then in Google Cloud Storage IDs section, you can see these IDs.

Related

This is an invalid xsi:type 'http://schemas.microsoft.com/office/taskpaneappversionoverrides:Project'

I have used yeoman generator and built the MS Project Add-in using Angular Framework. Now I want to upload the manifest in Office 365 Admin portal to make it available within our organization.
When I run the Office toolbox aka office validator . I am getting the following error and ended up with validation error.
XML Schema Violation: Your manifest does not adhere to the current set
of XML schema definitions for Office Add-in manifests.
- Details: This is an invalid xsi:type 'http://schemas.microsoft.com/office/taskpaneappversionoverrides:Project'.
I have tried generating a sample project using the latest version of yo office which is also failed in validation.
yo --version
3.1.0
Require help on this.
I have interacted with MSFT support team. After a good long conversation I finally figured out yeoman generated XML is not accepted in App source due to policy violations and overrides of element used.
Below is the simple approach of Manifest If any one wants to publish their add-ins.
<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TaskPaneApp">
<!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. Add your own below -->
<Id>your Guid</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.0</Version>
<ProviderName>Your Company name</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
<DisplayName DefaultValue="Add-in"/>
<Description
DefaultValue="Short Description"/>
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="Iconurl.com"/>
<HighResolutionIconUrl DefaultValue="Iconurl.com"/>
<SupportUrl DefaultValue="https://yourcompany.com/help"/>
<AppDomains>
<AppDomain>yourcompany.com</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Project"/>
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://yourcompany/index.html"/>
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
</OfficeApp>
Please read the comments for better understanding. Hope it will help someone who wants to publish it to AppSource. Thanks

Accessing files in the Google Cloud Storage from two different google cloud projects

Consider the following situation:
I have two AppEngine projects: A and B
I have a Cloud Storage bucket with the following ACL:
<?xml version="1.0" ?>
<AccessControlList>
<Owner>
<ID>id-of-the-user-who-created-the-bucket</ID>
</Owner>
<Entries>
<Entry>
<Scope type="UserByEmail">
<EmailAddress>app-A-service-account-name</EmailAddress>
</Scope>
<Permission>FULL_CONTROL</Permission>
</Entry>
<Entry>
<Scope type="UserByEmail">
<EmailAddress>app-B-service-account-name</EmailAddress>
</Scope>
<Permission>FULL_CONTROL</Permission>
</Entry>
</Entries>
</AccessControlList>
My GAE applications are written in Python and they are using GCS Client Library
Now, here is what I want to achieve: I want application A to create files inside the bucket and then application B to read them.
At first I tried to simply create a file with cloudstorage.open(file_name, 'w') and then read its status with cloudstorage.stat(file_name, 'r'), but this way I end up with the following error while reading:
ForbiddenError at /.../
Expect status [200] from Google Storage. But got status 403.
(The error message provides also request/response information: path, headers, body and extra info. Please let me know if you think they may be helpful in solving this case)
Then I started experimenting with ACLs by setting the x-googl-acl option while creating a file, for example:
cloudstorage.open(file_name, 'w', options={'x-goog-acl': 'authenticated-read'})
Although ACLs work as intended, none of the available options seem to fit my requirements:
private - only the bucket owner has the access, B cannot read
public-read - file is accessible by anonymous users, unacceptable
public-read-write - same as above
authenticated-read - everyone with authenticated account is able to read (even people who are not part of the project), so it's no different than the previous option
bucket-owner-read - seems perfect, but it turns out that "the bucket owner" is NOT the user who was set as "owner" through the Cloud Console, but the user who created the bucket
bucket-owner-full-control - same as above
It looks like I ran out of options, but I can't believe that such a simple thing cannot be achieved with the Cloud Storage. The only solution that comes to my mind is changing system's architecture, but I would like to avoid it. Any other suggestions?
Add the accessor Service Accounts (e.g. app1#appspot.gserviceaccount.com or 1234567890-compute#developer.gserviceaccount.com for compute engine) as member with 'Editor' permission on project with the GCS bucket to use. This can be done in IAM page of the project that owns the bucket:
https://console.developers.google.com/iam-admin/iam/project?project=app1

Amazon MWS inventory XML feed doesn't update quantity

I'm trying to upload my inventory to Amazon via XML feed, but my quantity in seller central doesn't update.
My XML feed is below. Can anyone help find my mistake?
<?xml version="1.0" ?><AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>A3QPCC6I4V1QU3</MerchantIdentifier>
</Header>
<MessageType>Inventory</MessageType>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Inventory>
<SKU>BHAL10105</SKU>
<Quantity>1</Quantity>
<Available>true</Available>
<FulfillmentLatency>7</FulfillmentLatency>
</Inventory>
</Message>
</AmazonEnvelope>
When you submit your feed, you will receive a FeedSubmissionId identifying it. Then it will be processed in the background.
When the processing has completed, you can use the GetFeedSubmissionResult operation to retrieve the result to see if it was successful, or why it was unsuccessful.
You can also check the most recent feeds by logging in to Amazon Seller Central and opening this page.
You can also use the Amazon MWS Scratchpad to submit the operation to check the result.
thanks for your advices,i solved !!.
i must upload to amazon a txt file whith the inventory calculated by software.
then i have created an inventory txt file and with api mws i upload it to amazon with this feetype _POST_FLAT_FILE_INVLOADER_DATA_

Persisting Entities to a Database Java

I'm just starting to work with persistence and databases in my use of webapps. I have created several Entity classes and have a database connection set up in Eclipse, but I'm not sure how to generate the tables from those entities. This is all I've managed to come up with so far:
public class Main {
#Resource
static UserTransaction utx;
#PersistenceUnit
static EntityManagerFactory emf;
public static void main(String[] args) throws Exception {
EntityManager em = emf.createEntityManager();
utx.begin();
em.joinTransaction();
User user = new User();
user.setUsername("cvolkernick");
em.persist(user);
utx.commit();
em.flush();
em.close();
emf.close();
}
}
You can create Tables from Entity declarations, using the Dali JPA Tools. As long as your project is configured with a JPA facet, you will have access to these tools. Creating tables from entities is as simple as right-clicking on your project, and then browsing through the context menu, as shown in the below screenshot:
Note that it is preferable to create tables in this manner, or by hand-coding the DDL statements yourself. It is not recommended to have the JPA provider create the tables for you, as you would lose the ability to place the table definitions under version control. They're also suboptimal and not meant to be used in production. Even for small projects, it is not worth the trouble, as the ability of the JPA provider (EclipseLink or Hibernate) to generate fine-tuned DDL statements is quite limited. In any case, if you wish to have the JPA provider do this work for you, details are as follows:
If your JPA provider is EclipseLink:
Your persistence.xml file ought to look like the following:
<?xml version="1.0" encoding="UTF-8"?>
<persistence ...>
<persistence-unit ...>
...
<properties>
<!-- valid values include 'none, 'drop-and-create-tables' and 'create-tables' -->
<property name="eclipselink.ddl-generation" value="create-tables"/>
<!-- valid values include 'both', 'database' and 'sql-script' -->
<property name="eclipselink.ddl-generation.output-mode" value="database"/>
...
</properties>
</persistence-unit>
</persistence>
You can configure these values from Eclipse, by opening the persistence.xml file with the Persistence XML editor:
Details of the EclipseLink schema generation properties and values can be found in the EclipseLink wiki.
If your JPA provider is Hibernate:
Your persistence.xml file ought to look like the following:
<?xml version="1.0" encoding="UTF-8"?>
<persistence ...>
<persistence-unit ...>
...
<properties>
<!-- valid values include 'validate', 'update', 'create' and 'create-drop' -->
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
...
</properties>
</persistence-unit>
</persistence>
Unlike the EclipseLink values, the ones for Hibernate cannot be configured from the Persistence XML editor of Eclipse. You can find other Hibernate properties in the Hibernate Core documentation.
Also, note that the in the case of both EclipseLink and Hibernate, you might need to specify additional properties like the connection pool configuration and the database dialect, to aid the schema generators.

Exchange 2010 Impersonation trouble when requesting a User's Calendar Availability Details

I'm working on project where an external application is trying to get the availability info (Free/busy) along with the details (Location/Subject/etc) for group of users in Exchange 2010.
I've read enough that I think that the best way to do this is through a service account run by the application that impersonates the user in question and pulls back their calendar information.
I've set up impersonation for the service account and run the basic test that I found on technet: http://msdn.microsoft.com/en-us/library/bb204088(v=exchg.140).aspx
This works for pulling back the mailbox folder (as the example) and if try to pull back the calendar folder.
I also found how to get availability via technet:
http://msdn.microsoft.com/en-us/library/aa563800(v=exchg.140).aspx
which will also work if I login as the user that I'm trying to find the calendar info for.
The problem comes when I try to combine both the impersonation XML with the get availability. Here is what I have for the two combine:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:ExchangeImpersonation>
<t:ConnectingSID>
<t:PrincipalName>[usersname#myorg.org]</t:PrincipalName>
</t:ConnectingSID>
</t:ExchangeImpersonation>
</soap:Header>
<soap:Body>
<GetUserAvailabilityRequest xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<t:TimeZone xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<Bias>300</Bias>
<StandardTime>
<Bias>0</Bias>
<Time>02:00:00</Time>
<DayOrder>1</DayOrder>
<Month>11</Month>
<DayOfWeek>Sunday</DayOfWeek>
</StandardTime>
<DaylightTime>
<Bias>-60</Bias>
<Time>02:00:00</Time>
<DayOrder>2</DayOrder>
<Month>3</Month>
<DayOfWeek>Sunday</DayOfWeek>
</DaylightTime>
</t:TimeZone>
<MailboxDataArray>
<t:MailboxData>
<t:Email>
<t:Address>[usersname#myorg.org]</t:Address>
</t:Email>
<t:AttendeeType>Required</t:AttendeeType>
<t:ExcludeConflicts>false</t:ExcludeConflicts>
</t:MailboxData>
</MailboxDataArray>
<t:FreeBusyViewOptions>
<t:TimeWindow>
<t:StartTime>2011-07-28T00:00:00</t:StartTime>
<t:EndTime>2011-07-28T23:59:59</t:EndTime>
</t:TimeWindow>
<t:MergedFreeBusyIntervalInMinutes>5</t:MergedFreeBusyIntervalInMinutes>
<t:RequestedView>DetailedMerged</t:RequestedView>
</t:FreeBusyViewOptions>
</GetUserAvailabilityRequest>
</soap:Body>
</soap:Envelope>
What I get back is this:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorProxyRequestNotAllowed</faultcode>
<faultstring xml:lang="en-US">Client context header found but no request type found in SOAP header.</faultstring>
<detail>
<m:ErrorCode xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">5015</m:ErrorCode>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
Digging around a little more in technet, the ErrorProxyRequestNotAllowed info:
"This error indicates that the request that Exchange Web Services sent to another Client Access server when trying to fulfill a GetUserAvailability request was invalid. This response code typically indicates that a configuration or rights error has occurred, or that someone tried unsuccessfully to mimic an availability proxy request."
What I'm having trouble with, is how impersonation seems to be working in the cases where I'm pulling back the user's mail and calendar folders, but not working for the case where I want to check their availability.
Right now, I'm just sending the straight XML via curl (wrapped in a little python script).
Anyone have any pointers? Thanks in advance!
I finally found a few (old) references that this is known feature/bug with GetUser[blank]Request style calls and Impersonation.
The two just do not work together. I hope this save someone a little time.

Resources