Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for GEE service account credentials #773

Open
kevinlacaille opened this issue Nov 16, 2022 · 2 comments
Open

Add support for GEE service account credentials #773

kevinlacaille opened this issue Nov 16, 2022 · 2 comments

Comments

@kevinlacaille
Copy link
Contributor

Is your feature request related to a problem? Please describe.
In order for a user to bring their own GCS service account, we must supply them with somewhere to input that SA's credentials in
order_request.google_earth_engine()

We already show support for the credentials field on our Dev Center's example request JSON.

Describe the solution you'd like
Current Google Earth Engine configuration:

def google_earth_engine(project: str, collection: str) -> dict:
    '''Google Earth Engine configuration.
    Parameters:
        project: GEE project name.
        collection: GEE Image Collection name.
    '''
    cloud_details = {
        'project': project,
        'collection': collection,
    }
    return {'google_earth_engine': cloud_details}

Proposed solution:

def google_earth_engine(project: str, collection: str, credentials: str) -> dict:
    '''Google Earth Engine configuration.
    Parameters:
        project: GEE project name.
        collection: GEE Image Collection name.
        credentials: Base64-encoded credentials for the GEE service account
    '''
    cloud_details = {
        'project': project,
        'collection': collection,
        'credentials': credentials,
    }
    return {'google_earth_engine': cloud_details}

Current test:

def test_google_earth_engine():
    gee_config = order_request.google_earth_engine('project', 'collection')
    expected = {
        'google_earth_engine': {
            'project': 'project',
            'collection': 'collection',
        }
    }

    assert gee_config == expected

Proposed test:

def test_google_earth_engine():
    gee_config = order_request.google_earth_engine('project', 'collection', 'credentials')
    expected = {
        'google_earth_engine': {
            'project': 'project',
            'collection': 'collection',
            'credentials': '<REDACTED>',
        }
    }

    assert gee_config == expected

Additional context
Many users like to bring their own service account over using Planet's, so this feature is likely to be used.

@strixcuriosus
Copy link
Contributor

Note: bringing your own service account for GEE delivery is recommended for high volume workloads.

With the default Planet Service Account, the ingest queue can fill up with large orders. Planet recommends a limit of approximately 1000 assets delivered per organization, per day. There is also an option to bring their own service account for a dedicated queue with greater scalability.

See these docs for more info:
https://developers.planet.com/docs/integrations/gee/faq/
https://developers.planet.com/docs/integrations/gee/delivery/#creating-a-service-account

@strixcuriosus
Copy link
Contributor

Any thoughts on how the CLI UX could encourage and/or inform users of this option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Planet SDK for Python (V2)
Full Backlog & Triage
Development

No branches or pull requests

3 participants