Streamlit 앱 생성 및 사용에 필요한 권한

Within Streamlit in Snowflake, a Streamlit app is a securable object that adheres to the Snowflake access control framework. Streamlit apps use a permission model that is based on owner’s rights. For more information, see 소유자 권리 및 Streamlit in Snowflake 앱 이해하기. You can also configure a container-runtime app to use restricted caller’s rights (Preview). For more information, see 제한된 호출자의 권한 및 Streamlit in Snowflake.

앱 소유자와 Streamlit 앱이 포함된 스키마의 소유자는 앱 사용 권한을 가진 역할을 결정할 수 있습니다. 사용자는 앱과 상호 작용할 수 있으며 Streamlit 앱에 표시되는 모든 것을 볼 수 있습니다. 사용자는 편집 모드에 액세스할 수 없다는 점을 제외하고 소유자와 동일한 앱 뷰를 갖습니다.

자세한 내용은 Streamlit 앱 공유하기 섹션을 참조하십시오.

Streamlit 앱을 생성하는 데 필요한 권한

Streamlit 앱을 생성하려면 역할이 다음 테이블의 오브젝트를 소유하지 않는 경우 역할에 해당 오브젝트에 대한 나열된 :ref:`권한<label-access_control_overview_privileges>`이 있어야 합니다.

권한

오브젝트

참고

CREATE STREAMLIT

Streamlit 오브젝트를 생성하는 스키마

READ

Streamlit 앱 소스 파일을 복사하는 스테이지

USAGE

Streamlit 앱에서 사용하는 웨어하우스

USAGE

Streamlit 앱에서 사용하는 컴퓨팅 풀

이 권한은 앱이 Container Runtime을 사용하는 경우에만 필요합니다.

USAGE

Streamlit 앱에서 사용하는 외부 액세스 통합

이 권한은 앱이 외부 액세스 통합을 사용하는 경우에만 필요합니다. Container Runtime의 경우, PyPI과 같은 외부 패키지 인덱스에서 패키지를 설치하려면 이 권한이 필요합니다.

USAGE

Streamlit 앱에서 사용하는 시크릿

이 권한은 앱이 시크릿을 사용하고 Warehouse Runtime에만 적용되는 경우에만 필요합니다.

CREATE STAGE

Streamlit 오브젝트를 생성하는 스키마

이 권한은 ROOT_LOCATION 매개 변수를 사용하여 Streamlit 오브젝트를 생성할 때만 필요합니다.

스키마의 오브젝트에 대한 작업을 수행하려면 상위 데이터베이스에 대한 하나 이상의 권한과 상위 스키마에 대한 하나 이상의 권한이 필요합니다.

Use the GRANT <privileges> … TO ROLE command to grant these privileges to a role. The following example shows how to grant the necessary privileges to create container-runtime apps:

GRANT USAGE ON DATABASE streamlit_db TO ROLE streamlit_developer;
GRANT USAGE ON SCHEMA streamlit_db.apps TO ROLE streamlit_developer;
GRANT CREATE STREAMLIT ON SCHEMA streamlit_db.apps TO ROLE streamlit_developer;
GRANT USAGE ON COMPUTE_POOL streamlit_compute_pool TO ROLE streamlit_developer;
GRANT USAGE ON INTEGRATION python_package_index TO ROLE streamlit_developer;
GRANT USAGE ON WAREHOUSE streamlit_wh TO ROLE streamlit_developer;

데이터베이스 또는 스키마에 향후 부여가 정의되어 있는 경우 사용자가 향후 부여에 정의된 역할을 사용하여 Streamlit 앱을 생성해야 합니다.

Streamlit 앱을 보는 데 필요한 권한

Streamlit 앱을 보려면 Snowflake 계정이 있고 계정에 로그인되어 있어야 합니다. 또한 다음 오브젝트에 대한 USAGE 권한이 부여된 역할을 사용해야 합니다.

  • Streamlit 앱이 포함된 데이터베이스

  • Streamlit 앱이 포함된 스키마

  • Streamlit 앱

대부분의 경우 앱 소유자가 Streamlit 앱을 다른 역할과 공유하면 USAGE 권한이 자동으로 새 역할에 부여됩니다. 그러나 MANAGED ACCESS가 있는 스키마에서 Streamlit 앱이 생성된 경우 USAGE 권한을 새 역할에 수동으로 부여해야 합니다.

스키마 소유자 또는 MANAGE GRANTS 권한이 있는 역할의 사용자는 이 예에 표시된 대로 GRANT <privileges> … TO ROLE 명령을 사용하여 USAGE 권한을 부여해야 합니다.

GRANT USAGE ON DATABASE streamlit_db TO ROLE streamlit_viewer;
GRANT USAGE ON SCHEMA streamlit_db.streamlit_schema TO ROLE streamlit_viewer;
GRANT USAGE ON STREAMLIT streamlit_db.streamlit_schema.streamlit_app TO ROLE streamlit_viewer;

스키마 소유자 또는 MANAGE GRANTS 권한이 있는 역할을 가진 사용자는 이 예시와 같이 USAGE 권한을 부여하여 스키마에서 생성된 향후 모든 Streamlit 앱을 볼 수 있습니다.

GRANT USAGE ON FUTURE STREAMLITS IN SCHEMA streamlit_db.streamlit_schema TO ROLE streamlit_viewer;